Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
EnzoNetwork
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; import "src/libraries/Errors.sol"; import "src/interfaces/IEnzoNetwork.sol"; import "src/interfaces/IMintStrategy.sol"; import "src/interfaces/IMintableBurnable.sol"; import "src/modules/Dao.sol"; import "src/modules/Assets.sol"; import "src/modules/Version.sol"; import "src/modules/Whitelisted.sol"; import "src/modules/WithdrawalRequest.sol"; import "src/interfaces/IMintStrategy.sol"; import "openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @title EnzoNetwork * @author EnzoNetwork * @notice Manage asset minting and withdrawals */ contract EnzoNetwork is Initializable, Version, Dao, Assets, WithdrawalRequest, Whitelisted, IEnzoNetwork { // mintSecurity is responsible for checking the guardian's minting signature address public mintSecurityAddr; modifier onlyMintSecurity() { if (msg.sender != mintSecurityAddr) revert Errors.PermissionDenied(); _; } constructor() { _disableInitializers(); } function initialize( address _ownerAddr, address _dao, address _blackListAdmin, address _mintSecurityAddr, address[] calldata _tokenAddrs, address[] calldata _mintStrategies ) public initializer { if ( _ownerAddr == address(0) || _dao == address(0) || _mintSecurityAddr == address(0) || _blackListAdmin == address(0) ) { revert Errors.InvalidAddr(); } __Version_init(_ownerAddr); __Dao_init(_dao); __Assets_init(_tokenAddrs); __WithdrawalRequest_init(50400, _blackListAdmin); __Whitelisted_init(_mintStrategies); mintSecurityAddr = _mintSecurityAddr; } /** * The user has completed the deposit and the guardians has signed the minting tx * @param _token The address of the asset to be minted * @param _to The address where the token is received * @param _mintAmount mint amount */ function mint(address _token, address _to, uint256 _mintAmount) external onlyMintSecurity { // Check if assets are supported if (!_isSupportedAsset(_token)) { revert Errors.AssetNotSupported(); } // Check if the asset is suspended if (_isPausedAsset(_token)) { revert Errors.AssetPaused(); } if (_to == address(0)) { revert Errors.InvalidAddr(); } address _admin = _getAssetAdmin(_token); IMintableBurnable(_admin).whiteListMint(_mintAmount, _to); } /** * Allow users to deposit assets for minting * @param _strategy deposit strategy * @param _token The address of the asset to be minted * @param _amount deposit amount, when the asset precision is different, _amount may not be the final deposit amount */ function deposit(address _strategy, address _token, uint256 _amount) external whenNotPaused { _checkWhitelisted(_strategy); address _user = msg.sender; uint256 _mintAmount = IMintStrategy(_strategy).deposit(_token, _user, _amount); address _admin = _getAssetAdmin(_token); IMintableBurnable(_admin).whiteListMint(_mintAmount, _user); emit Deposit(_strategy, _token, _mintAmount); } /** * User application for withdrawing underlying assets * @param _strategy deposit strategy * @param _token he address of the asset to be minted * @param _withdrawalAmount withdrawal amount, enzoBTC amount * @param _withdrawalAddr withdrawal addr, if the _strategy is not nativeBTCStrategy, it can be empty */ function requestWithdrawals( address _strategy, address _token, uint256 _withdrawalAmount, bytes memory _withdrawalAddr ) external payable whenNotPaused { if (_strategy != nativeWithdrawStrategy) { // If it is a deposit strategy, check whether the strategy address is recognized _checkWhitelisted(_strategy); if (nonNativeWithdrawalFee != msg.value) { // Check whether the handling fee is prepaid revert Errors.InvalidAmount(); } (, IMintStrategy.StrategyStatus _withdrawStatus) = IMintStrategy(_strategy).getStrategyStatus(); if (_withdrawStatus != IMintStrategy.StrategyStatus.Open) { revert Errors.StrategyBTCWithdrawPaused(); } } else { // If it is a native withdrawal, check whether it is suspended if (nativeWithdrawPaused) { revert Errors.NativeBTCWithdrawPaused(); } // There is no pre-collection fee for native withdrawals, and the fee will be charged on the BTC chain if (msg.value != 0) { revert Errors.InvalidAmount(); } } // Check if the token is supported if (!_isSupportedAsset(_token)) { revert Errors.AssetNotSupported(); } address _sender = msg.sender; bool ok = IBaseToken(_token).transferFrom(_sender, address(this), _withdrawalAmount); if (!ok) { revert Errors.TransferFailed(); } // _withdrawalAmount is enzoBTC amount, decimals is 8 _requestWithdrawals(_strategy, _token, _sender, _withdrawalAmount, _withdrawalAddr); } /** * Batch claim to satisfy delayed withdrawal requests * @param _receivers receiver addr * @param _requestIds withdrawal request id */ function bulkClaimWithdrawals(address[] memory _receivers, uint256[][] memory _requestIds) external { uint256 bulkLen = _receivers.length; if (bulkLen != _requestIds.length) { revert Errors.InvalidLength(); } for (uint256 i = 0; i < bulkLen; ++i) { claimWithdrawals(_receivers[i], _requestIds[i]); } } /** * claim to satisfy delayed withdrawal requests * @param _receiver receiver addr * @param _requestIds withdrawal request id */ function claimWithdrawals(address _receiver, uint256[] memory _requestIds) public whenNotPaused nonReentrant { for (uint256 i = 0; i < _requestIds.length; ++i) { uint256 _requestId = _requestIds[i]; (uint256 _withdrawalAmount, address _token) = _claimWithdrawals(_receiver, _requestId); address _admin = _getAssetAdmin(_token); IMintableBurnable(_admin).whiteListBurn(_withdrawalAmount, address(this)); } } /** * Adding supported assets * @param _token asset addr */ function addAsset(address _token) external onlyDao { _addAsset(_token); } /** * Remove supported assets * @param _token asset addr */ function removeAsset(address _token) external onlyDao { _removeAsset(_token); } /** * Whether to suspend or re-support assets * @param _token asset addr * @param _AssetStatus asset status */ function setAssetStatus(address _token, bool _AssetStatus) external onlyDao { _setAssetStatus(_token, _AssetStatus); } /** * Set up blacklist administrators to handle abnormal withdrawals * Such as withdrawals initiated by attackers * @param _blackListAdmin blackList admin */ function setBlackListAdmin(address _blackListAdmin) external onlyDao { _setBlackListAdmin(_blackListAdmin); } /** * Set delay block for native withdrawals * @param _withdrawalDelayBlocks withdrawal delay block */ function setWithdrawalDelayBlocks(uint256 _withdrawalDelayBlocks) public onlyDao { _setWithdrawalDelayBlocks(_withdrawalDelayBlocks); } /** * Set nonNativeWithdrawalFee * @param _nonNativeWithdrawalFee nonNativeWithdrawal fee * @notice Non-native withdrawal pre-collection fee, used to help users automatically claim * There is no pre-collection fee for native withdrawals, and the fee will be charged on the BTC chain */ function setNonNativeWithdrawalFee(uint256 _nonNativeWithdrawalFee) public onlyDao { _setNonNativeWithdrawalFee(_nonNativeWithdrawalFee); } /** * Set the state of native withdrawal * @param _status withdrawal status */ function setNativeBTCPausedStatus(bool _status) public onlyDao { _setNativeBTCPaused(_status); } /** * Add deposit strategy * @param _strategies deposit strategies */ function addStrategyWhitelisted(address[] calldata _strategies) external onlyDao { _addWhitelisted(_strategies); } /** * Remove strategy * @param _strategies deposit strategies */ function removeStrategyWhitelisted(address[] calldata _strategies) external onlyDao { _removeWhitelisted(_strategies); } /** * change mintSecurityAddr * @param _mintSecurityAddr mintSecurity contract address */ function setMintSecurityAddr(address _mintSecurityAddr) external onlyDao { emit MintSecurityAddrChanged(mintSecurityAddr, _mintSecurityAddr); mintSecurityAddr = _mintSecurityAddr; } function setAssetAdmin(address _token, address _tokenAdmin) external onlyDao { _setAssetAdmin(_token, _tokenAdmin); } /** * Owner set dao addr * @param _dao dao addr */ function setDao(address _dao) public onlyOwner { _setDao(_dao); } /** * @notice Contract type id */ function typeId() public pure override returns (bytes32) { return keccak256("EnzoNetwork"); } /** * @notice Contract version */ function version() public pure override returns (uint8) { return 2; } /** * @notice stop protocol */ function pause() external onlyDao { _pause(); } /** * @notice start protocol */ function unpause() external onlyDao { _unpause(); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; library Errors { error PermissionDenied(); error InvalidAddr(); error InvalidVersion(); error InvalidtypeId(); error InvalidParameter(); error InvalidAmount(); error UpdateTimelocked(); error InvalidLength(); error InvalidRequestId(); error ClaimTooEarly(); error DelayTooLarge(); error BlackListed(); error DuplicateAddress(); error NotAGuardian(); error InvalidSignature(); error SignaturesNotSorted(); error DepositNoQuorum(); error MsgHashAlreadyMint(); error InvalidAsset(); error AssetAlreadyExist(); error AssetNotSupported(); error AssetPaused(); error NoRedeemable(); error NoWithdrawalRequested(); error CantRequestWithdrawal(); error StrategyClosed(); error StrategyNotWhitelisted(); error DuplicateStrategy(); error WithdrawalNotOpen(); error DepositNotOpen(); error TransferFailed(); error AssetDismatch(); error ExceedDepositLimit(); error NativeBTCWithdrawPaused(); error StrategyBTCWithdrawPaused(); error ExecuteFailed(); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; interface IEnzoNetwork { function mint(address token, address to, uint256 mintAmount) external; event Deposit(address _strategy, address _token, uint256 _mintAmount); event MintSecurityAddrChanged(address _oldMintSecurityAddr, address _mintSecurityAddr); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; interface IMintStrategy { enum StrategyStatus { Close, // 0 Open // 1 } function getStrategyStatus() external view returns (StrategyStatus _depositStatus, StrategyStatus _withdrawStatus); function getWithdrawalDelayBlocks() external view returns (uint256); function deposit(address _token, address _user, uint256 _amount) external returns (uint256); function withdraw(address _token, address _user, uint256 _amount) external; event DepositStatusChanged(StrategyStatus _oldStatus, StrategyStatus _status); event WithdrawalStatusChanged(StrategyStatus _oldStatus, StrategyStatus _status); event EnzoNetworkChanged(address EnzoNetwork, address _EnzoNetwork); event Withdrawal(address _strategy, address _underlyingToken, address _user, uint256 _amount); event WithdrawalDelayChanged(uint256 _oldWithdrawalDelayBlocks, uint256 _withdrawalDelayBlocks); event Deposit(address _strategy, address _underlyingToken, address _user, uint256 _amount); event TxExecuted(uint256 _value, address _to, bytes _data); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; interface IMintableBurnable { function whiteListMint(uint256 _amount, address _account) external; function whiteListBurn(uint256 _amount, address _account) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; import {Errors} from "src/libraries/Errors.sol"; import "src/interfaces/IDao.sol"; import "openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @title dao permission contract * @author EnzoNetwork * @notice This is an abstract contract, although there are no unimplemented functions. * This contract is used in other contracts as a basic contract for dao's authority management. */ abstract contract Dao is Initializable, IDao { address public dao; modifier onlyDao() { if (msg.sender != dao) revert Errors.PermissionDenied(); _; } function __Dao_init(address _dao) internal onlyInitializing { dao = _dao; } function _setDao(address _dao) internal { emit DaoChanged(dao, _dao); dao = _dao; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; import "src/libraries/Errors.sol"; import "src/interfaces/IBaseToken.sol"; import "src/interfaces/IAssets.sol"; import "openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @title Asset Management * @author EnzoNetwork * @notice Provide asset management function module */ abstract contract Assets is Initializable, IAssets { address[] internal assetList; mapping(address => bool) public assetPaused; mapping(address => address) public assetAdmin; function __Assets_init(address[] calldata _tokenAddrs) internal onlyInitializing { for (uint256 i = 0; i < _tokenAddrs.length; ++i) { address _token = _tokenAddrs[i]; _checkAssets(_token); assetList.push(_token); } } function getAssetList() public view returns (address[] memory) { return assetList; } function _checkAssets(address _token) internal view { if (IBaseToken(_token).tokenAdmin() != address(this)) { revert Errors.InvalidAsset(); } if (_isSupportedAsset(_token)) { revert Errors.AssetAlreadyExist(); } } function _getAssetAdmin(address _token) internal view returns (address) { address _admin = assetAdmin[_token]; if (_admin == address(0)) { return (_token); } return (_admin); } function _isSupportedAsset(address _token) internal view returns (bool) { bool found = false; uint256 _length = assetList.length; for (uint256 i = 0; i < _length;) { if (address(assetList[i]) == _token) { found = true; break; } unchecked { ++i; } } return found; } function _isPausedAsset(address _token) internal view returns (bool) { return assetPaused[_token]; } function _addAsset(address _token) internal { _checkAssets(_token); assetList.push(_token); emit AssetAdded(_token); } function _removeAsset(address _token) internal { uint256 _length = assetList.length; for (uint256 i = 0; i < _length;) { if (assetList[i] == _token) { assetList[i] = assetList[_length - 1]; assetList.pop(); if (assetPaused[_token]) { assetPaused[_token] = false; } emit AssetRemoved(_token); return; } unchecked { ++i; } } } function _setAssetStatus(address _token, bool _AssetStatus) internal { emit AssetStatusChanged(_AssetStatus); assetPaused[_token] = _AssetStatus; } function _setAssetAdmin(address _token, address _assetAdmin) internal { if (!_isSupportedAsset(_token)) { revert Errors.AssetNotSupported(); } emit AssetAdminChanged(assetAdmin[_token], _assetAdmin); assetAdmin[_token] = _assetAdmin; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; import "openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol"; import "openzeppelin-contracts-upgradeable/access/OwnableUpgradeable.sol"; import "openzeppelin-contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "openzeppelin-contracts-upgradeable/security/PausableUpgradeable.sol"; import "openzeppelin-contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import {Errors} from "src/libraries/Errors.sol"; import "src/interfaces/IVersion.sol"; /** * @title Version management contract * @author EnzoNetwork * @notice Encapsulates the basic functions of * UUPSUpgradeable contract, * OwnableUpgradeable contract, * PausableUpgradeable contract, * and ReentrancyGuardUpgradeable contract. */ abstract contract Version is Initializable, UUPSUpgradeable, OwnableUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable { function __Version_init(address _ownerAddr) internal onlyInitializing { _transferOwnership(_ownerAddr); __UUPSUpgradeable_init(); __Pausable_init(); } /** * @notice When upgrading the contract, * it is required that the typeid of the contract must be constant and version +1. */ function _authorizeUpgrade(address newImplementation) internal view override onlyOwner { if (IVersion(newImplementation).typeId() != typeId()) { revert Errors.InvalidtypeId(); } if (IVersion(newImplementation).version() != version() + 1) { revert Errors.InvalidVersion(); } } function implementation() external view returns (address) { return _getImplementation(); } /** * @notice Contract type id */ function typeId() public pure virtual returns (bytes32); /** * @notice Contract version */ function version() public pure virtual returns (uint8); /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; import "src/libraries/Errors.sol"; import "src/interfaces/IWhitelisted.sol"; import "openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @title Whitelisted Management * @author EnzoNetwork * @notice Provides management strategy functions */ abstract contract Whitelisted is Initializable, IWhitelisted { mapping(address => bool) public isWhitelisted; address[] internal whitelistedList; function _checkWhitelisted(address _strategy) internal view { if (!isWhitelisted[_strategy]) revert Errors.StrategyNotWhitelisted(); } function __Whitelisted_init(address[] calldata _strategies) internal onlyInitializing { uint256 strategiesLength = _strategies.length; for (uint256 i = 0; i < strategiesLength;) { address _strategy = _strategies[i]; if (_strategy == address(0)) { revert Errors.InvalidAddr(); } if (isWhitelisted[_strategy]) { revert Errors.DuplicateStrategy(); } isWhitelisted[_strategy] = true; whitelistedList.push(_strategy); emit AddedToWhitelist(_strategy); unchecked { ++i; } } } function getWhitelistedList() public view returns (address[] memory) { return whitelistedList; } function _addWhitelisted(address[] calldata _strategies) internal { uint256 strategiesLength = _strategies.length; for (uint256 i = 0; i < strategiesLength;) { if (!isWhitelisted[_strategies[i]]) { isWhitelisted[_strategies[i]] = true; whitelistedList.push(_strategies[i]); emit AddedToWhitelist(_strategies[i]); } unchecked { ++i; } } } function _removeWhitelisted(address[] calldata _strategies) internal { uint256 strategiesLength = _strategies.length; for (uint256 i = 0; i < strategiesLength;) { if (isWhitelisted[_strategies[i]]) { isWhitelisted[_strategies[i]] = false; _removeSlice(_strategies[i]); emit RemovedFromWhitelist(_strategies[i]); } unchecked { ++i; } } } function _removeSlice(address _strategy) internal { uint256 _whitelistedListLength = whitelistedList.length; for (uint256 i = 0; i < _whitelistedListLength;) { if (whitelistedList[i] == _strategy) { whitelistedList[i] = whitelistedList[_whitelistedListLength - 1]; whitelistedList.pop(); return; } unchecked { ++i; } } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; import "src/libraries/Errors.sol"; import "src/modules/BlackList.sol"; import "src/interfaces/IWithdrawalRequest.sol"; import "src/interfaces/IMintStrategy.sol"; import "openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @title Withdrawal request contract * @author EnzoNetwork * @notice Provides basic functions for withdrawal orders. */ abstract contract WithdrawalRequest is Initializable, BlackList, IWithdrawalRequest { address public constant nativeWithdrawStrategy = 0x000000000000000000000000000000000000000b; bool public nativeWithdrawPaused; struct WithdrawalInfo { uint96 withdrawalHeight; uint32 claimed; uint128 withdrawalAmount; address token; address strategy; bytes withdrawalAddr; } uint256 public withdrawalDelayBlocks; // 10 days uint256 public constant MAX_WITHDRAWAL_DELAY_BLOCKS = 72000; mapping(address => WithdrawalInfo[]) internal withdrawalQueue; mapping(address => uint256) public totalWithdrawalAmount; uint256 public nonNativeWithdrawalFee; function __WithdrawalRequest_init(uint256 _withdrawalDelayBlocks, address _blackListAdmin) internal onlyInitializing { _setWithdrawalDelayBlocks(_withdrawalDelayBlocks); __BlackList_init(_blackListAdmin); nativeWithdrawPaused = false; } /** * @notice Query all withdrawals of the recipient * @param _receiver fund recipient */ function getUserWithdrawals(address _receiver) public view returns (WithdrawalInfo[] memory) { return withdrawalQueue[_receiver]; } /** * @notice Check if the withdrawal can be claimed * @param _receiver fund recipient * @param _requestId withdrawal request id */ function canClaimWithdrawal(address _receiver, uint256 _requestId) public view returns (bool) { WithdrawalInfo[] memory _userWithdrawals = withdrawalQueue[_receiver]; if (_requestId >= _userWithdrawals.length) { revert Errors.InvalidLength(); } if (isBlackListed[_receiver]) { return false; } (uint256 _withdrawalDelayBlocks,) = getWithdrawalDelayBlocks(_userWithdrawals[_requestId].strategy); if (block.number < _userWithdrawals[_requestId].withdrawalHeight + _withdrawalDelayBlocks) { return false; } return true; } /** * @notice Create withdrawal request * @param _receiver fund recipient * @param _withdrawalAmount withdrawal amount */ function _requestWithdrawals( address _strategy, address _token, address _receiver, uint256 _withdrawalAmount, bytes memory _withdrawalAddr ) internal { uint256 _blockNumber = block.number; withdrawalQueue[_receiver].push( WithdrawalInfo({ withdrawalHeight: uint96(_blockNumber), claimed: 0, withdrawalAmount: uint128(_withdrawalAmount), token: _token, strategy: _strategy, withdrawalAddr: _withdrawalAddr }) ); totalWithdrawalAmount[_strategy] += _withdrawalAmount; emit WithdrawalsRequest( _token, _receiver, withdrawalQueue[_receiver].length - 1, _withdrawalAmount, _withdrawalAddr, _blockNumber ); } function getWithdrawalDelayBlocks(address _strategy) internal view returns (uint256, bool) { uint256 _withdrawalDelayBlocks = 0; bool isNativeStrategy = false; if (_strategy == nativeWithdrawStrategy) { _withdrawalDelayBlocks = withdrawalDelayBlocks; isNativeStrategy = true; } else { _withdrawalDelayBlocks = IMintStrategy(_strategy).getWithdrawalDelayBlocks(); } return (_withdrawalDelayBlocks, isNativeStrategy); } /** * @notice Claim withdrawal * @param _receiver fund recipient * @param _requestId withdrawal request id */ function _claimWithdrawals(address _receiver, uint256 _requestId) internal returns (uint256, address) { WithdrawalInfo memory _userWithdrawal = withdrawalQueue[_receiver][_requestId]; (uint256 _withdrawalDelayBlocks, bool isNativeStrategy) = getWithdrawalDelayBlocks(_userWithdrawal.strategy); uint256 _blockNumber = block.number; if ( _userWithdrawal.withdrawalAmount == 0 || _userWithdrawal.claimed != 0 || isBlackListed[_receiver] || _blockNumber < _userWithdrawal.withdrawalHeight + _withdrawalDelayBlocks ) { revert Errors.InvalidRequestId(); } if (!isNativeStrategy) { // Withdrawal of erc20 assets, transfer of corresponding assets to users IMintStrategy(_userWithdrawal.strategy).withdraw( _userWithdrawal.token, _receiver, _userWithdrawal.withdrawalAmount ); } // If it is a native asset withdrawal, // the custody service will monitor the withdrawal event and complete the payment asynchronously withdrawalQueue[_receiver][_requestId].claimed = 1; totalWithdrawalAmount[_userWithdrawal.strategy] -= _userWithdrawal.withdrawalAmount; emit WithdrawalsClaimed( _userWithdrawal.token, _receiver, _requestId, _userWithdrawal.withdrawalAmount, _userWithdrawal.withdrawalAddr, _blockNumber ); return (_userWithdrawal.withdrawalAmount, _userWithdrawal.token); } function _setNativeBTCPaused(bool _status) internal { emit NativeBTCPausedChanged(nativeWithdrawPaused, _status); nativeWithdrawPaused = _status; } function _setNonNativeWithdrawalFee(uint256 _nonNativeWithdrawalFee) internal { emit NonNativeWithdrawalFeeChanged(nonNativeWithdrawalFee, _nonNativeWithdrawalFee); nonNativeWithdrawalFee = _nonNativeWithdrawalFee; } /** * @notice update withdarawal delay block number * @param _withdrawalDelayBlocks new delay block number */ function _setWithdrawalDelayBlocks(uint256 _withdrawalDelayBlocks) internal { if (_withdrawalDelayBlocks > MAX_WITHDRAWAL_DELAY_BLOCKS) { revert Errors.DelayTooLarge(); } emit WithdrawalDelayChanged(withdrawalDelayBlocks, _withdrawalDelayBlocks); withdrawalDelayBlocks = _withdrawalDelayBlocks; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; interface IDao { event DaoChanged(address _oldDao, address _dao); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; import "openzeppelin-contracts/token/ERC20/IERC20.sol"; interface IBaseToken is IERC20 { function whiteListMint(uint256 _amount, address _account) external; function whiteListBurn(uint256 _amount, address _account) external; function tokenAdmin() external view returns (address); event TokenAdminChanged(address _oldTokenAdmin, address _tokenAdmin); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; interface IAssets { event AssetAdded(address _token); event AssetRemoved(address _token); event AssetStatusChanged(bool _status); event AssetAdminChanged(address _oldAdmin, address _newAdmin); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import {Initializable} from "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate the implementation's compatibility when performing an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeTo(address newImplementation) public virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ReentrancyGuardUpgradeable is Initializable { // 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; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; interface IVersion { function typeId() external pure returns (bytes32); function version() external pure returns (uint8); function implementation() external view returns (address); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; interface IWhitelisted { event AddedToWhitelist(address _addr); event RemovedFromWhitelist(address _addr); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; import "src/libraries/Errors.sol"; import "src/interfaces/IBlackList.sol"; import "openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @title Blacklist management * @author EnzoNetwork * @notice Provides a freezing function when unexpected withdrawals occur, such as withdrawals by attackers */ abstract contract BlackList is Initializable, IBlackList { mapping(address => bool) public isBlackListed; address public blackListAdmin; modifier onlyBlackListAdmin() { if (msg.sender != blackListAdmin) revert Errors.PermissionDenied(); _; } function __BlackList_init(address _blackListAdmin) internal onlyInitializing { blackListAdmin = _blackListAdmin; } function __BlackList_init_OnlyNotSet(address _blackListAdmin) internal { if (blackListAdmin == address(0)) { blackListAdmin = _blackListAdmin; } } function addBlackList(address _user) external onlyBlackListAdmin { isBlackListed[_user] = true; emit AddedBlackList(_user); } function removeBlackList(address _user) external onlyBlackListAdmin { isBlackListed[_user] = false; emit RemovedBlackList(_user); } function _setBlackListAdmin(address _blackListAdmin) internal { emit BlackListAdminChanged(blackListAdmin, _blackListAdmin); blackListAdmin = _blackListAdmin; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; interface IWithdrawalRequest { event WithdrawalDelayChanged(uint256 _oldWithdrawalDelayBlocks, uint256 _withdrawalDelayBlocks); event NativeBTCPausedChanged(bool _oldStatus, bool _status); event NonNativeWithdrawalFeeChanged(uint256 _oldNonNativeWithdrawalFee, uint256 _nonNativeWithdrawalFee); event WithdrawalsRequest( address _token, address _receiver, uint256 _requestId, uint256 _withdrawalAmount, bytes _withdrawalAddr, uint256 _blockNumber ); event WithdrawalsClaimed( address _token, address _receiver, uint256 _requestId, uint256 _claimAmount, bytes _withdrawalAddr, uint256 _blockNumber ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/IERC1967Upgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import {Initializable} from "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ */ abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { AddressUpgradeable.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.12; interface IBlackList { event AddedBlackList(address _user); event RemovedBlackList(address _user); event BlackListAdminChanged(address _oldAdmin, address _admin); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) pragma solidity ^0.8.0; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. * * _Available since v4.8.3._ */ interface IERC1967Upgradeable { /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
{ "remappings": [ "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/", "LayerZero-v2/=lib/LayerZero-v2/", "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": false, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AssetAlreadyExist","type":"error"},{"inputs":[],"name":"AssetNotSupported","type":"error"},{"inputs":[],"name":"AssetPaused","type":"error"},{"inputs":[],"name":"DelayTooLarge","type":"error"},{"inputs":[],"name":"DuplicateStrategy","type":"error"},{"inputs":[],"name":"InvalidAddr","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidAsset","type":"error"},{"inputs":[],"name":"InvalidLength","type":"error"},{"inputs":[],"name":"InvalidRequestId","type":"error"},{"inputs":[],"name":"InvalidVersion","type":"error"},{"inputs":[],"name":"InvalidtypeId","type":"error"},{"inputs":[],"name":"NativeBTCWithdrawPaused","type":"error"},{"inputs":[],"name":"PermissionDenied","type":"error"},{"inputs":[],"name":"StrategyBTCWithdrawPaused","type":"error"},{"inputs":[],"name":"StrategyNotWhitelisted","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_user","type":"address"}],"name":"AddedBlackList","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_addr","type":"address"}],"name":"AddedToWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_token","type":"address"}],"name":"AssetAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"_newAdmin","type":"address"}],"name":"AssetAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_token","type":"address"}],"name":"AssetRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_status","type":"bool"}],"name":"AssetStatusChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"_admin","type":"address"}],"name":"BlackListAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_oldDao","type":"address"},{"indexed":false,"internalType":"address","name":"_dao","type":"address"}],"name":"DaoChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_strategy","type":"address"},{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_oldMintSecurityAddr","type":"address"},{"indexed":false,"internalType":"address","name":"_mintSecurityAddr","type":"address"}],"name":"MintSecurityAddrChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_oldStatus","type":"bool"},{"indexed":false,"internalType":"bool","name":"_status","type":"bool"}],"name":"NativeBTCPausedChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_oldNonNativeWithdrawalFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_nonNativeWithdrawalFee","type":"uint256"}],"name":"NonNativeWithdrawalFeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_user","type":"address"}],"name":"RemovedBlackList","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_addr","type":"address"}],"name":"RemovedFromWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_oldWithdrawalDelayBlocks","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_withdrawalDelayBlocks","type":"uint256"}],"name":"WithdrawalDelayChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_claimAmount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_withdrawalAddr","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"_blockNumber","type":"uint256"}],"name":"WithdrawalsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_withdrawalAmount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_withdrawalAddr","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"_blockNumber","type":"uint256"}],"name":"WithdrawalsRequest","type":"event"},{"inputs":[],"name":"MAX_WITHDRAWAL_DELAY_BLOCKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"addAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"addBlackList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_strategies","type":"address[]"}],"name":"addStrategyWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assetAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assetPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blackListAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_receivers","type":"address[]"},{"internalType":"uint256[][]","name":"_requestIds","type":"uint256[][]"}],"name":"bulkClaimWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_requestId","type":"uint256"}],"name":"canClaimWithdrawal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256[]","name":"_requestIds","type":"uint256[]"}],"name":"claimWithdrawals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dao","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAssetList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"getUserWithdrawals","outputs":[{"components":[{"internalType":"uint96","name":"withdrawalHeight","type":"uint96"},{"internalType":"uint32","name":"claimed","type":"uint32"},{"internalType":"uint128","name":"withdrawalAmount","type":"uint128"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"strategy","type":"address"},{"internalType":"bytes","name":"withdrawalAddr","type":"bytes"}],"internalType":"struct WithdrawalRequest.WithdrawalInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistedList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_ownerAddr","type":"address"},{"internalType":"address","name":"_dao","type":"address"},{"internalType":"address","name":"_blackListAdmin","type":"address"},{"internalType":"address","name":"_mintSecurityAddr","type":"address"},{"internalType":"address[]","name":"_tokenAddrs","type":"address[]"},{"internalType":"address[]","name":"_mintStrategies","type":"address[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBlackListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintSecurityAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeWithdrawPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeWithdrawStrategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonNativeWithdrawalFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"removeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"removeBlackList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_strategies","type":"address[]"}],"name":"removeStrategyWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_withdrawalAmount","type":"uint256"},{"internalType":"bytes","name":"_withdrawalAddr","type":"bytes"}],"name":"requestWithdrawals","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_tokenAdmin","type":"address"}],"name":"setAssetAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_AssetStatus","type":"bool"}],"name":"setAssetStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_blackListAdmin","type":"address"}],"name":"setBlackListAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dao","type":"address"}],"name":"setDao","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mintSecurityAddr","type":"address"}],"name":"setMintSecurityAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setNativeBTCPausedStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nonNativeWithdrawalFee","type":"uint256"}],"name":"setNonNativeWithdrawalFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawalDelayBlocks","type":"uint256"}],"name":"setWithdrawalDelayBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalWithdrawalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"typeId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdrawalDelayBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e7565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000e5576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6080516142c76200011f60003960008181610c2601528181610c6f01528181610df601528181610e36015261107001526142c76000f3fe6080604052600436106102ae5760003560e01c80637139053e11610175578063c1467974116100dc578063e47d606011610095578063e720f1a21161006f578063e720f1a214610861578063f2fde38b14610898578063f837a5ab146108b8578063fdba8ad6146108d857600080fd5b8063e47d6060146107e3578063e4997dc514610814578063e502eb681461083457600080fd5b8063c146797414610733578063c4c4886414610754578063c6c3bbe614610774578063ca661c0414610794578063d1829c62146107ab578063de86ef59146107cc57600080fd5b80638340f5491161012e5780638340f5491461066d5780638456cb591461068d5780638693701f146106a25780638da5cb5b146106c25780638f940f63146106e0578063b0f870f81461071357600080fd5b80637139053e146105b8578063715018a6146105d857806378865853146105ed57806378bbc7c41461060d5780637c7621e51461062d578063821683f01461064d57600080fd5b80634a5e42b11161021957806354fd4d50116101d257806354fd4d501461051a5780635c60da1b146105365780635c975abb1461054b5780635dff7b901461056357806364ba0917146105835780636637b8821461059857600080fd5b80634a5e42b11461047b5780634d50f9a41461049b5780634f1ef286146104bb57806350f73e7c146104ce578063515bbf2c146104e557806352d1902d1461050557600080fd5b80633659cfe61161026b5780633659cfe6146103ac5780633765c0b8146103cc5780633af32abf146103e15780633b3539e2146104125780633f4ba83a1461042d5780634162169f1461044257600080fd5b80630ecb93c0146102b35780631f24f0b1146102d5578063298410e51461031b5780632f95bd3a1461033b578063303c7dd41461034e5780633627c1971461038a575b600080fd5b3480156102bf57600080fd5b506102d36102ce366004613787565b6108f8565b005b3480156102e157600080fd5b506103066102f0366004613787565b6101936020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561032757600080fd5b506102d3610336366004613787565b610980565b6102d361034936600461385b565b6109b8565b34801561035a57600080fd5b5061037c610369366004613787565b6101fd6020526000908152604090205481565b604051908152602001610312565b34801561039657600080fd5b5061039f610bb8565b60405161031291906138c7565b3480156103b857600080fd5b506102d36103c7366004613787565b610c1b565b3480156103d857600080fd5b5061039f610cea565b3480156103ed57600080fd5b506103066103fc366004613787565b6102316020526000908152604090205460ff1681565b34801561041e57600080fd5b506101fa546103069060ff1681565b34801561043957600080fd5b506102d3610d4b565b34801561044e57600080fd5b5061015f54610463906001600160a01b031681565b6040516001600160a01b039091168152602001610312565b34801561048757600080fd5b506102d3610496366004613787565b610d81565b3480156104a757600080fd5b506102d36104b6366004613914565b610db6565b6102d36104c936600461392d565b610deb565b3480156104da57600080fd5b5061037c6101fb5481565b3480156104f157600080fd5b506102d36105003660046139c2565b610ea5565b34801561051157600080fd5b5061037c611063565b34801561052657600080fd5b5060405160028152602001610312565b34801561054257600080fd5b50610463611116565b34801561055757600080fd5b5060c95460ff16610306565b34801561056f57600080fd5b506102d361057e366004613a7c565b611125565b34801561058f57600080fd5b50610463600b81565b3480156105a457600080fd5b506102d36105b3366004613787565b61115b565b3480156105c457600080fd5b506102d36105d3366004613b44565b61116c565b3480156105e457600080fd5b506102d3611245565b3480156105f957600080fd5b50610306610608366004613b8a565b611257565b34801561061957600080fd5b506102d3610628366004613787565b61147e565b34801561063957600080fd5b506102d3610648366004613914565b6114b3565b34801561065957600080fd5b506102d3610668366004613bc4565b6114e8565b34801561067957600080fd5b506102d3610688366004613be1565b61151d565b34801561069957600080fd5b506102d3611675565b3480156106ae57600080fd5b506102d36106bd366004613c22565b6116a9565b3480156106ce57600080fd5b506097546001600160a01b0316610463565b3480156106ec57600080fd5b507ff9f0b6ee2e79f7d431bcdf2c714d0514eb23e8fd461eb6c7aba86125154bf5bf61037c565b34801561071f57600080fd5b506102d361072e366004613c64565b6116df565b34801561073f57600080fd5b5061026554610463906001600160a01b031681565b34801561076057600080fd5b506102d361076f366004613c22565b611715565b34801561078057600080fd5b506102d361078f366004613be1565b61174b565b3480156107a057600080fd5b5061037c6201194081565b3480156107b757600080fd5b506101c754610463906001600160a01b031681565b3480156107d857600080fd5b5061037c6101fe5481565b3480156107ef57600080fd5b506103066107fe366004613787565b6101c66020526000908152604090205460ff1681565b34801561082057600080fd5b506102d361082f366004613787565b611875565b34801561084057600080fd5b5061085461084f366004613787565b6118f3565b6040516103129190613cea565b34801561086d57600080fd5b5061046361087c366004613787565b610194602052600090815260409020546001600160a01b031681565b3480156108a457600080fd5b506102d36108b3366004613787565b611a5b565b3480156108c457600080fd5b506102d36108d3366004613787565b611ad1565b3480156108e457600080fd5b506102d36108f3366004613e32565b611b68565b6101c7546001600160a01b0316331461092457604051630782484160e21b815260040160405180910390fd5b6001600160a01b03811660008181526101c66020908152604091829020805460ff1916600117905590519182527f42e160154868087d6bfdc0ca23d96a1c1cfa32f1b72ba9ba27b69b98a0d819dc91015b60405180910390a150565b61015f546001600160a01b031633146109ac57604051630782484160e21b815260040160405180910390fd5b6109b581611be8565b50565b6109c0611c70565b6001600160a01b038416600b14610a9c576109da84611cb6565b346101fe54146109fd5760405163162908e360e11b815260040160405180910390fd5b6000846001600160a01b03166376a7b83a6040518163ffffffff1660e01b81526004016040805180830381865afa158015610a3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a609190613efe565b915060019050816001811115610a7857610a78613f31565b14610a9657604051630464fe1f60e01b815260040160405180910390fd5b50610ae0565b6101fa5460ff1615610ac15760405163672c4e9760e01b815260040160405180910390fd5b3415610ae05760405163162908e360e11b815260040160405180910390fd5b610ae983611cf0565b610b065760405163981a2a2b60e01b815260040160405180910390fd5b6040516323b872dd60e01b8152336004820181905230602483015260448201849052906000906001600160a01b038616906323b872dd906064016020604051808303816000875af1158015610b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b839190613f47565b905080610ba3576040516312171d8360e31b815260040160405180910390fd5b610bb08686848787611d56565b505050505050565b6060610232805480602002602001604051908101604052809291908181526020018280548015610c1157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610bf3575b5050505050905090565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610c6d5760405162461bcd60e51b8152600401610c6490613f64565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610c9f611ef4565b6001600160a01b031614610cc55760405162461bcd60e51b8152600401610c6490613fb0565b610cce81611f10565b604080516000808252602082019092526109b59183919061204b565b6060610192805480602002602001604051908101604052809291908181526020018280548015610c11576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610bf3575050505050905090565b61015f546001600160a01b03163314610d7757604051630782484160e21b815260040160405180910390fd5b610d7f6121bb565b565b61015f546001600160a01b03163314610dad57604051630782484160e21b815260040160405180910390fd5b6109b58161220d565b61015f546001600160a01b03163314610de257604051630782484160e21b815260040160405180910390fd5b6109b58161238f565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610e345760405162461bcd60e51b8152600401610c6490613f64565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610e66611ef4565b6001600160a01b031614610e8c5760405162461bcd60e51b8152600401610c6490613fb0565b610e9582611f10565b610ea18282600161204b565b5050565b600054610100900460ff1615808015610ec55750600054600160ff909116105b80610edf5750303b158015610edf575060005460ff166001145b610f425760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c64565b6000805460ff191660011790558015610f65576000805461ff0019166101001790555b6001600160a01b0389161580610f8257506001600160a01b038816155b80610f9457506001600160a01b038616155b80610fa657506001600160a01b038716155b15610fc45760405163e481c26960e01b815260040160405180910390fd5b610fcd896123f5565b610fd688612435565b610fe0858561247f565b610fec61c4e088612546565b610ff6838361258e565b61026580546001600160a01b0319166001600160a01b0388161790558015611058576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146111035760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610c64565b5060008051602061424b83398151915290565b6000611120611ef4565b905090565b61015f546001600160a01b0316331461115157604051630782484160e21b815260040160405180910390fd5b610ea182826126f2565b61116361279f565b6109b5816127f9565b611174611c70565b61117c612864565b60005b815181101561123a57600082828151811061119c5761119c613ffc565b602002602001015190506000806111b386846128be565b9150915060006111c282612c3f565b604051638e433bc760e01b8152600481018590523060248201529091506001600160a01b03821690638e433bc790604401600060405180830381600087803b15801561120d57600080fd5b505af1158015611221573d6000803e3d6000fd5b50505050505050508061123390614028565b905061117f565b50610ea1600160fb55565b61124d61279f565b610d7f6000612c69565b6001600160a01b03821660009081526101fc6020908152604080832080548251818502810185019093528083528493849084015b828210156113af5760008481526020908190206040805160c0810182526004860290920180546001600160601b0381168452600160601b810463ffffffff1694840194909452600160801b9093046001600160801b03169082015260018201546001600160a01b039081166060830152600283015416608082015260038201805491929160a08401919061131e90614043565b80601f016020809104026020016040519081016040528092919081815260200182805461134a90614043565b80156113975780601f1061136c57610100808354040283529160200191611397565b820191906000526020600020905b81548152906001019060200180831161137a57829003601f168201915b5050505050815250508152602001906001019061128b565b505050509050805183106113d65760405163251f56a160e21b815260040160405180910390fd5b6001600160a01b03841660009081526101c6602052604090205460ff1615611402576000915050611478565b600061142a82858151811061141957611419613ffc565b602002602001015160800151612cbb565b5090508082858151811061144057611440613ffc565b6020026020010151600001516001600160601b031661145f919061407e565b43101561147157600092505050611478565b6001925050505b92915050565b61015f546001600160a01b031633146114aa57604051630782484160e21b815260040160405180910390fd5b6109b581612d4e565b61015f546001600160a01b031633146114df57604051630782484160e21b815260040160405180910390fd5b6109b581612db9565b61015f546001600160a01b0316331461151457604051630782484160e21b815260040160405180910390fd5b6109b581612dfc565b611525611c70565b61152e83611cb6565b604051638340f54960e01b81526001600160a01b03838116600483015233602483018190526044830184905291600091861690638340f549906064016020604051808303816000875af1158015611589573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ad9190614096565b905060006115ba85612c3f565b6040516319157fab60e21b8152600481018490526001600160a01b03858116602483015291925090821690636455feac90604401600060405180830381600087803b15801561160857600080fd5b505af115801561161c573d6000803e3d6000fd5b5050604080516001600160a01b03808b168252891660208201529081018590527f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62925060600190505b60405180910390a1505050505050565b61015f546001600160a01b031633146116a157604051630782484160e21b815260040160405180910390fd5b610d7f612e54565b61015f546001600160a01b031633146116d557604051630782484160e21b815260040160405180910390fd5b610ea18282612e91565b61015f546001600160a01b0316331461170b57604051630782484160e21b815260040160405180910390fd5b610ea18282612fdc565b61015f546001600160a01b0316331461174157604051630782484160e21b815260040160405180910390fd5b610ea1828261303d565b610265546001600160a01b0316331461177757604051630782484160e21b815260040160405180910390fd5b61178083611cf0565b61179d5760405163981a2a2b60e01b815260040160405180910390fd5b6001600160a01b0383166000908152610193602052604090205460ff16156117d75760405162411eb960e91b815260040160405180910390fd5b6001600160a01b0382166117fe5760405163e481c26960e01b815260040160405180910390fd5b600061180984612c3f565b6040516319157fab60e21b8152600481018490526001600160a01b03858116602483015291925090821690636455feac90604401600060405180830381600087803b15801561185757600080fd5b505af115801561186b573d6000803e3d6000fd5b5050505050505050565b6101c7546001600160a01b031633146118a157604051630782484160e21b815260040160405180910390fd5b6001600160a01b03811660008181526101c66020908152604091829020805460ff1916905590519182527fd7e9ec6e6ecd65492dce6bf513cd6867560d49544421d0783ddf06e76c24470c9101610975565b6001600160a01b03811660009081526101fc60209081526040808320805482518185028101850190935280835260609492939192909184015b82821015611a505760008481526020908190206040805160c0810182526004860290920180546001600160601b0381168452600160601b810463ffffffff1694840194909452600160801b9093046001600160801b03169082015260018201546001600160a01b039081166060830152600283015416608082015260038201805491929160a0840191906119bf90614043565b80601f01602080910402602001604051908101604052809291908181526020018280546119eb90614043565b8015611a385780601f10611a0d57610100808354040283529160200191611a38565b820191906000526020600020905b815481529060010190602001808311611a1b57829003601f168201915b5050505050815250508152602001906001019061192c565b505050509050919050565b611a6361279f565b6001600160a01b038116611ac85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c64565b6109b581612c69565b61015f546001600160a01b03163314611afd57604051630782484160e21b815260040160405180910390fd5b61026554604080516001600160a01b03928316815291831660208301527f93997aab8946fde90e9e1d1397b7cae93fdff13d08b6cd1e1b609b170c08225a910160405180910390a161026580546001600160a01b0319166001600160a01b0392909216919091179055565b815181518114611b8b5760405163251f56a160e21b815260040160405180910390fd5b60005b81811015611be257611bd2848281518110611bab57611bab613ffc565b6020026020010151848381518110611bc557611bc5613ffc565b602002602001015161116c565b611bdb81614028565b9050611b8e565b50505050565b611bf1816131b4565b61019280546001810182556000919091527ffcfced99f9d921eebdc59aa6f7a664084bd564a3d2d54ebc1a5c057c99c67aba0180546001600160a01b0319166001600160a01b0383169081179091556040519081527f0e3c58ebfb2e7465fbb1c32e6b4f40c3c4f5ca77e8218a386aff8617831260d790602001610975565b60c95460ff1615610d7f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c64565b6001600160a01b0381166000908152610231602052604090205460ff166109b557604051632efd965160e11b815260040160405180910390fd5b610192546000908190815b81811015611d4d57846001600160a01b03166101928281548110611d2157611d21613ffc565b6000918252602090912001546001600160a01b03161415611d455760019250611d4d565b600101611cfb565b50909392505050565b6001600160a01b0380841660009081526101fc60209081526040808320815160c0810183526001600160601b034381811683528286018781526001600160801b03808c169685019687528d8a16606086019081528f8b166080870190815260a087018d8152885460018181018b55998d529b8b902088516004909d0201805495519a518516600160801b0263ffffffff9b909b16600160601b026fffffffffffffffffffffffffffffffff199096169c9097169b909b1793909317909116969096178355945193820180549489166001600160a01b03199586161790559351600282018054919098169316929092179095559251805191949392611e62926003850192909101906136d9565b5050506001600160a01b03861660009081526101fd602052604081208054859290611e8e90849061407e565b90915550506001600160a01b03841660009081526101fc60205260409020547f971a8a7e3eae1c1f37d2746b98299a55c2f7adec443f81fd2e1fe86fb4e0c86c9086908690611edf906001906140af565b868686604051611665969594939291906140c6565b60008051602061424b833981519152546001600160a01b031690565b611f1861279f565b7ff9f0b6ee2e79f7d431bcdf2c714d0514eb23e8fd461eb6c7aba86125154bf5bf816001600160a01b0316638f940f636040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9b9190614096565b14611fb957604051630ce2ef5f60e11b815260040160405180910390fd5b611fc560026001614113565b60ff16816001600160a01b03166354fd4d506040518163ffffffff1660e01b8152600401602060405180830381865afa158015612006573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202a9190614138565b60ff16146109b55760405163a9146eeb60e01b815260040160405180910390fd5b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156120835761207e8361326e565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156120dd575060408051601f3d908101601f191682019092526120da91810190614096565b60015b6121405760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610c64565b60008051602061424b83398151915281146121af5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610c64565b5061207e83838361330a565b6121c361332f565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6101925460005b8181101561207e57826001600160a01b0316610192828154811061223a5761223a613ffc565b6000918252602090912001546001600160a01b03161415612387576101926122636001846140af565b8154811061227357612273613ffc565b60009182526020909120015461019280546001600160a01b0390921691839081106122a0576122a0613ffc565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101928054806122e0576122e061415b565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03851682526101939052604090205460ff1615612346576001600160a01b038316600090815261019360205260409020805460ff191690555b6040516001600160a01b03841681527f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc9060200160405180910390a1505050565b600101612214565b620119408111156123b25760405162de26ef60e51b815260040160405180910390fd5b6101fb5460408051918252602082018390527fab3f1d5eaee409b7067167f77f1fa3f8a863366d6fb2b88559cd4f9b8e03e182910160405180910390a16101fb55565b600054610100900460ff1661241c5760405162461bcd60e51b8152600401610c6490614171565b61242581612c69565b61242d613378565b6109b561339f565b600054610100900460ff1661245c5760405162461bcd60e51b8152600401610c6490614171565b61015f80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff166124a65760405162461bcd60e51b8152600401610c6490614171565b60005b8181101561207e5760008383838181106124c5576124c5613ffc565b90506020020160208101906124da9190613787565b90506124e5816131b4565b61019280546001810182556000919091527ffcfced99f9d921eebdc59aa6f7a664084bd564a3d2d54ebc1a5c057c99c67aba0180546001600160a01b0319166001600160a01b039290921691909117905561253f81614028565b90506124a9565b600054610100900460ff1661256d5760405162461bcd60e51b8152600401610c6490614171565b6125768261238f565b61257f816133ce565b50506101fa805460ff19169055565b600054610100900460ff166125b55760405162461bcd60e51b8152600401610c6490614171565b8060005b81811015611be25760008484838181106125d5576125d5613ffc565b90506020020160208101906125ea9190613787565b90506001600160a01b0381166126135760405163e481c26960e01b815260040160405180910390fd5b6001600160a01b0381166000908152610231602052604090205460ff161561264e5760405163cc5fde6960e01b815260040160405180910390fd5b6001600160a01b038116600081815261023160209081526040808320805460ff19166001908117909155610232805491820181559093527fcffd2c2e6f82dfc83b58e2df5c82f2a4b3a3d5a9f68fbfa24b96adf46c00deeb90920180546001600160a01b0319168417905590519182527fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab03910160405180910390a1506001016125b9565b6126fb82611cf0565b6127185760405163981a2a2b60e01b815260040160405180910390fd5b6001600160a01b03828116600090815261019460209081526040918290205482519084168152928416908301527f82e0cebbbfcea0d10cf649041c20143e863ed85b7e3427ac67cf58dd502426ee910160405180910390a16001600160a01b0391821660009081526101946020526040902080546001600160a01b03191691909216179055565b6097546001600160a01b03163314610d7f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c64565b61015f54604080516001600160a01b03928316815291831660208301527ffcde6c827a52b0870bc44ed9b10212272e18c9ea1725b772e9b493750afd8da4910160405180910390a161015f80546001600160a01b0319166001600160a01b0392909216919091179055565b600260fb5414156128b75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c64565b600260fb55565b6001600160a01b03821660009081526101fc60205260408120805482918291859081106128ed576128ed613ffc565b60009182526020918290206040805160c08101825260049390930290910180546001600160601b0381168452600160601b810463ffffffff1694840194909452600160801b9093046001600160801b03169082015260018201546001600160a01b039081166060830152600283015416608082015260038201805491929160a08401919061297a90614043565b80601f01602080910402602001604051908101604052809291908181526020018280546129a690614043565b80156129f35780601f106129c8576101008083540402835291602001916129f3565b820191906000526020600020905b8154815290600101906020018083116129d657829003601f168201915b5050505050815250509050600080612a0e8360800151612cbb565b6040850151919350915043906001600160801b03161580612a385750602084015163ffffffff1615155b80612a5c57506001600160a01b03881660009081526101c6602052604090205460ff165b80612a7b57508351612a789084906001600160601b031661407e565b81105b15612a99576040516302e8145360e61b815260040160405180910390fd5b81612b2157608084015160608501516040808701519051636ce5768960e11b81526001600160a01b0392831660048201528b831660248201526001600160801b03909116604482015291169063d9caed1290606401600060405180830381600087803b158015612b0857600080fd5b505af1158015612b1c573d6000803e3d6000fd5b505050505b6001600160a01b03881660009081526101fc6020526040902080546001919089908110612b5057612b50613ffc565b9060005260206000209060040201600001600c6101000a81548163ffffffff021916908363ffffffff16021790555083604001516001600160801b03166101fd600086608001516001600160a01b03166001600160a01b031681526020019081526020016000206000828254612bc691906140af565b925050819055507faf5c8db005d0f080f251f66754ce27b02ef8fb7674f7c2dea87dc0b5f6e8a1708460600151898987604001518860a0015186604051612c12969594939291906141bc565b60405180910390a150505060408101516060909101516001600160801b03909116925090505b9250929050565b6001600160a01b038082166000908152610194602052604081205490911680611478575090919050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008080806001600160a01b038516600b1415612cdf5750506101fb546001612d44565b846001600160a01b03166361b7a89c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d419190614096565b91505b9094909350915050565b6101c754604080516001600160a01b03928316815291831660208301527f495fcd239ff1c5629c93d3cf8c56e64bb4cb6815e022c1f45ed5263e77ac2f7b910160405180910390a16101c780546001600160a01b0319166001600160a01b0392909216919091179055565b6101fe5460408051918252602082018390527fab23966809ffa340c2171c0e4e053ae7a48aef5c1c71e9a0d06e7419898fe946910160405180910390a16101fe55565b6101fa546040805160ff9092161515825282151560208301527f88912b9442d2d36565a1f9372d2e9afd22c714c396f3c9bd5ac1c482c35a46a2910160405180910390a16101fa805460ff1916911515919091179055565b612e5c611c70565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121f03390565b8060005b81811015611be2576102316000858584818110612eb457612eb4613ffc565b9050602002016020810190612ec99190613787565b6001600160a01b0316815260208101919091526040016000205460ff1615612fd45760006102316000868685818110612f0457612f04613ffc565b9050602002016020810190612f199190613787565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055612f70848483818110612f5657612f56613ffc565b9050602002016020810190612f6b9190613787565b613418565b7fcdd2e9b91a56913d370075169cefa1602ba36be5301664f752192bb1709df757848483818110612fa357612fa3613ffc565b9050602002016020810190612fb89190613787565b6040516001600160a01b03909116815260200160405180910390a15b600101612e95565b60405181151581527f439a1291695561df9ec7072ebfc2354c08833ecb5bb9bad6ec43f8919e889d019060200160405180910390a16001600160a01b0391909116600090815261019360205260409020805460ff1916911515919091179055565b8060005b81811015611be257610231600085858481811061306057613060613ffc565b90506020020160208101906130759190613787565b6001600160a01b0316815260208101919091526040016000205460ff166131ac57600161023160008686858181106130af576130af613ffc565b90506020020160208101906130c49190613787565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905561023284848381811061310157613101613ffc565b90506020020160208101906131169190613787565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b039092169190911790557fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab0384848381811061317b5761317b613ffc565b90506020020160208101906131909190613787565b6040516001600160a01b03909116815260200160405180910390a15b600101613041565b306001600160a01b0316816001600160a01b031663b7e1917c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156131fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061322091906141fe565b6001600160a01b03161461324757604051636448d6e960e11b815260040160405180910390fd5b61325081611cf0565b156109b55760405163f0faeff560e01b815260040160405180910390fd5b6001600160a01b0381163b6132db5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610c64565b60008051602061424b83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6133138361351a565b6000825111806133205750805b1561207e57611be2838361355a565b60c95460ff16610d7f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c64565b600054610100900460ff16610d7f5760405162461bcd60e51b8152600401610c6490614171565b600054610100900460ff166133c65760405162461bcd60e51b8152600401610c6490614171565b610d7f613586565b600054610100900460ff166133f55760405162461bcd60e51b8152600401610c6490614171565b6101c780546001600160a01b0319166001600160a01b0392909216919091179055565b6102325460005b8181101561207e57826001600160a01b0316610232828154811061344557613445613ffc565b6000918252602090912001546001600160a01b031614156135125761023261346e6001846140af565b8154811061347e5761347e613ffc565b60009182526020909120015461023280546001600160a01b0390921691839081106134ab576134ab613ffc565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506102328054806134eb576134eb61415b565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b60010161341f565b6135238161326e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061357f838360405180606001604052806027815260200161426b602791396135b9565b9392505050565b600054610100900460ff166135ad5760405162461bcd60e51b8152600401610c6490614171565b60c9805460ff19169055565b6060600080856001600160a01b0316856040516135d6919061421b565b600060405180830381855af49150503d8060008114613611576040519150601f19603f3d011682016040523d82523d6000602084013e613616565b606091505b509150915061362786838387613631565b9695505050505050565b6060831561369d578251613696576001600160a01b0385163b6136965760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c64565b50816136a7565b6136a783836136af565b949350505050565b8151156136bf5781518083602001fd5b8060405162461bcd60e51b8152600401610c649190614237565b8280546136e590614043565b90600052602060002090601f016020900481019282613707576000855561374d565b82601f1061372057805160ff191683800117855561374d565b8280016001018555821561374d579182015b8281111561374d578251825591602001919060010190613732565b5061375992915061375d565b5090565b5b80821115613759576000815560010161375e565b6001600160a01b03811681146109b557600080fd5b60006020828403121561379957600080fd5b813561357f81613772565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156137e3576137e36137a4565b604052919050565b600082601f8301126137fc57600080fd5b813567ffffffffffffffff811115613816576138166137a4565b613829601f8201601f19166020016137ba565b81815284602083860101111561383e57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561387157600080fd5b843561387c81613772565b9350602085013561388c81613772565b925060408501359150606085013567ffffffffffffffff8111156138af57600080fd5b6138bb878288016137eb565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156139085783516001600160a01b0316835292840192918401916001016138e3565b50909695505050505050565b60006020828403121561392657600080fd5b5035919050565b6000806040838503121561394057600080fd5b823561394b81613772565b9150602083013567ffffffffffffffff81111561396757600080fd5b613973858286016137eb565b9150509250929050565b60008083601f84011261398f57600080fd5b50813567ffffffffffffffff8111156139a757600080fd5b6020830191508360208260051b8501011115612c3857600080fd5b60008060008060008060008060c0898b0312156139de57600080fd5b88356139e981613772565b975060208901356139f981613772565b96506040890135613a0981613772565b95506060890135613a1981613772565b9450608089013567ffffffffffffffff80821115613a3657600080fd5b613a428c838d0161397d565b909650945060a08b0135915080821115613a5b57600080fd5b50613a688b828c0161397d565b999c989b5096995094979396929594505050565b60008060408385031215613a8f57600080fd5b8235613a9a81613772565b91506020830135613aaa81613772565b809150509250929050565b600067ffffffffffffffff821115613acf57613acf6137a4565b5060051b60200190565b600082601f830112613aea57600080fd5b81356020613aff613afa83613ab5565b6137ba565b82815260059290921b84018101918181019086841115613b1e57600080fd5b8286015b84811015613b395780358352918301918301613b22565b509695505050505050565b60008060408385031215613b5757600080fd5b8235613b6281613772565b9150602083013567ffffffffffffffff811115613b7e57600080fd5b61397385828601613ad9565b60008060408385031215613b9d57600080fd5b8235613ba881613772565b946020939093013593505050565b80151581146109b557600080fd5b600060208284031215613bd657600080fd5b813561357f81613bb6565b600080600060608486031215613bf657600080fd5b8335613c0181613772565b92506020840135613c1181613772565b929592945050506040919091013590565b60008060208385031215613c3557600080fd5b823567ffffffffffffffff811115613c4c57600080fd5b613c588582860161397d565b90969095509350505050565b60008060408385031215613c7757600080fd5b8235613c8281613772565b91506020830135613aaa81613bb6565b60005b83811015613cad578181015183820152602001613c95565b83811115611be25750506000910152565b60008151808452613cd6816020860160208601613c92565b601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015613da457888303603f19018552815180516001600160601b031684528781015163ffffffff1688850152868101516001600160801b0316878501526060808201516001600160a01b03908116918601919091526080808301519091169085015260a09081015160c091850182905290613d9081860183613cbe565b968901969450505090860190600101613d11565b509098975050505050505050565b600082601f830112613dc357600080fd5b81356020613dd3613afa83613ab5565b82815260059290921b84018101918181019086841115613df257600080fd5b8286015b84811015613b3957803567ffffffffffffffff811115613e165760008081fd5b613e248986838b0101613ad9565b845250918301918301613df6565b60008060408385031215613e4557600080fd5b823567ffffffffffffffff80821115613e5d57600080fd5b818501915085601f830112613e7157600080fd5b81356020613e81613afa83613ab5565b82815260059290921b84018101918181019089841115613ea057600080fd5b948201945b83861015613ec7578535613eb881613772565b82529482019490820190613ea5565b96505086013592505080821115613edd57600080fd5b5061397385828601613db2565b805160028110613ef957600080fd5b919050565b60008060408385031215613f1157600080fd5b613f1a83613eea565b9150613f2860208401613eea565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613f5957600080fd5b815161357f81613bb6565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561403c5761403c614012565b5060010190565b600181811c9082168061405757607f821691505b6020821081141561407857634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561409157614091614012565b500190565b6000602082840312156140a857600080fd5b5051919050565b6000828210156140c1576140c1614012565b500390565b6001600160a01b03878116825286166020820152604081018590526060810184905260c06080820181905260009061410090830185613cbe565b90508260a0830152979650505050505050565b600060ff821660ff84168060ff0382111561413057614130614012565b019392505050565b60006020828403121561414a57600080fd5b815160ff8116811461357f57600080fd5b634e487b7160e01b600052603160045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b03878116825286166020820152604081018590526001600160801b038416606082015260c06080820181905260009061410090830185613cbe565b60006020828403121561421057600080fd5b815161357f81613772565b6000825161422d818460208701613c92565b9190910192915050565b60208152600061357f6020830184613cbe56fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204a21abff54d259f74abdc1146d89b47ea2109d00e4a19f911597dc88c54f0bfc64736f6c634300080c0033
Deployed Bytecode
0x6080604052600436106102ae5760003560e01c80637139053e11610175578063c1467974116100dc578063e47d606011610095578063e720f1a21161006f578063e720f1a214610861578063f2fde38b14610898578063f837a5ab146108b8578063fdba8ad6146108d857600080fd5b8063e47d6060146107e3578063e4997dc514610814578063e502eb681461083457600080fd5b8063c146797414610733578063c4c4886414610754578063c6c3bbe614610774578063ca661c0414610794578063d1829c62146107ab578063de86ef59146107cc57600080fd5b80638340f5491161012e5780638340f5491461066d5780638456cb591461068d5780638693701f146106a25780638da5cb5b146106c25780638f940f63146106e0578063b0f870f81461071357600080fd5b80637139053e146105b8578063715018a6146105d857806378865853146105ed57806378bbc7c41461060d5780637c7621e51461062d578063821683f01461064d57600080fd5b80634a5e42b11161021957806354fd4d50116101d257806354fd4d501461051a5780635c60da1b146105365780635c975abb1461054b5780635dff7b901461056357806364ba0917146105835780636637b8821461059857600080fd5b80634a5e42b11461047b5780634d50f9a41461049b5780634f1ef286146104bb57806350f73e7c146104ce578063515bbf2c146104e557806352d1902d1461050557600080fd5b80633659cfe61161026b5780633659cfe6146103ac5780633765c0b8146103cc5780633af32abf146103e15780633b3539e2146104125780633f4ba83a1461042d5780634162169f1461044257600080fd5b80630ecb93c0146102b35780631f24f0b1146102d5578063298410e51461031b5780632f95bd3a1461033b578063303c7dd41461034e5780633627c1971461038a575b600080fd5b3480156102bf57600080fd5b506102d36102ce366004613787565b6108f8565b005b3480156102e157600080fd5b506103066102f0366004613787565b6101936020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561032757600080fd5b506102d3610336366004613787565b610980565b6102d361034936600461385b565b6109b8565b34801561035a57600080fd5b5061037c610369366004613787565b6101fd6020526000908152604090205481565b604051908152602001610312565b34801561039657600080fd5b5061039f610bb8565b60405161031291906138c7565b3480156103b857600080fd5b506102d36103c7366004613787565b610c1b565b3480156103d857600080fd5b5061039f610cea565b3480156103ed57600080fd5b506103066103fc366004613787565b6102316020526000908152604090205460ff1681565b34801561041e57600080fd5b506101fa546103069060ff1681565b34801561043957600080fd5b506102d3610d4b565b34801561044e57600080fd5b5061015f54610463906001600160a01b031681565b6040516001600160a01b039091168152602001610312565b34801561048757600080fd5b506102d3610496366004613787565b610d81565b3480156104a757600080fd5b506102d36104b6366004613914565b610db6565b6102d36104c936600461392d565b610deb565b3480156104da57600080fd5b5061037c6101fb5481565b3480156104f157600080fd5b506102d36105003660046139c2565b610ea5565b34801561051157600080fd5b5061037c611063565b34801561052657600080fd5b5060405160028152602001610312565b34801561054257600080fd5b50610463611116565b34801561055757600080fd5b5060c95460ff16610306565b34801561056f57600080fd5b506102d361057e366004613a7c565b611125565b34801561058f57600080fd5b50610463600b81565b3480156105a457600080fd5b506102d36105b3366004613787565b61115b565b3480156105c457600080fd5b506102d36105d3366004613b44565b61116c565b3480156105e457600080fd5b506102d3611245565b3480156105f957600080fd5b50610306610608366004613b8a565b611257565b34801561061957600080fd5b506102d3610628366004613787565b61147e565b34801561063957600080fd5b506102d3610648366004613914565b6114b3565b34801561065957600080fd5b506102d3610668366004613bc4565b6114e8565b34801561067957600080fd5b506102d3610688366004613be1565b61151d565b34801561069957600080fd5b506102d3611675565b3480156106ae57600080fd5b506102d36106bd366004613c22565b6116a9565b3480156106ce57600080fd5b506097546001600160a01b0316610463565b3480156106ec57600080fd5b507ff9f0b6ee2e79f7d431bcdf2c714d0514eb23e8fd461eb6c7aba86125154bf5bf61037c565b34801561071f57600080fd5b506102d361072e366004613c64565b6116df565b34801561073f57600080fd5b5061026554610463906001600160a01b031681565b34801561076057600080fd5b506102d361076f366004613c22565b611715565b34801561078057600080fd5b506102d361078f366004613be1565b61174b565b3480156107a057600080fd5b5061037c6201194081565b3480156107b757600080fd5b506101c754610463906001600160a01b031681565b3480156107d857600080fd5b5061037c6101fe5481565b3480156107ef57600080fd5b506103066107fe366004613787565b6101c66020526000908152604090205460ff1681565b34801561082057600080fd5b506102d361082f366004613787565b611875565b34801561084057600080fd5b5061085461084f366004613787565b6118f3565b6040516103129190613cea565b34801561086d57600080fd5b5061046361087c366004613787565b610194602052600090815260409020546001600160a01b031681565b3480156108a457600080fd5b506102d36108b3366004613787565b611a5b565b3480156108c457600080fd5b506102d36108d3366004613787565b611ad1565b3480156108e457600080fd5b506102d36108f3366004613e32565b611b68565b6101c7546001600160a01b0316331461092457604051630782484160e21b815260040160405180910390fd5b6001600160a01b03811660008181526101c66020908152604091829020805460ff1916600117905590519182527f42e160154868087d6bfdc0ca23d96a1c1cfa32f1b72ba9ba27b69b98a0d819dc91015b60405180910390a150565b61015f546001600160a01b031633146109ac57604051630782484160e21b815260040160405180910390fd5b6109b581611be8565b50565b6109c0611c70565b6001600160a01b038416600b14610a9c576109da84611cb6565b346101fe54146109fd5760405163162908e360e11b815260040160405180910390fd5b6000846001600160a01b03166376a7b83a6040518163ffffffff1660e01b81526004016040805180830381865afa158015610a3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a609190613efe565b915060019050816001811115610a7857610a78613f31565b14610a9657604051630464fe1f60e01b815260040160405180910390fd5b50610ae0565b6101fa5460ff1615610ac15760405163672c4e9760e01b815260040160405180910390fd5b3415610ae05760405163162908e360e11b815260040160405180910390fd5b610ae983611cf0565b610b065760405163981a2a2b60e01b815260040160405180910390fd5b6040516323b872dd60e01b8152336004820181905230602483015260448201849052906000906001600160a01b038616906323b872dd906064016020604051808303816000875af1158015610b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b839190613f47565b905080610ba3576040516312171d8360e31b815260040160405180910390fd5b610bb08686848787611d56565b505050505050565b6060610232805480602002602001604051908101604052809291908181526020018280548015610c1157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610bf3575b5050505050905090565b306001600160a01b037f000000000000000000000000be49b318c9728f3db46993e9ee8990dbfce080c6161415610c6d5760405162461bcd60e51b8152600401610c6490613f64565b60405180910390fd5b7f000000000000000000000000be49b318c9728f3db46993e9ee8990dbfce080c66001600160a01b0316610c9f611ef4565b6001600160a01b031614610cc55760405162461bcd60e51b8152600401610c6490613fb0565b610cce81611f10565b604080516000808252602082019092526109b59183919061204b565b6060610192805480602002602001604051908101604052809291908181526020018280548015610c11576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610bf3575050505050905090565b61015f546001600160a01b03163314610d7757604051630782484160e21b815260040160405180910390fd5b610d7f6121bb565b565b61015f546001600160a01b03163314610dad57604051630782484160e21b815260040160405180910390fd5b6109b58161220d565b61015f546001600160a01b03163314610de257604051630782484160e21b815260040160405180910390fd5b6109b58161238f565b306001600160a01b037f000000000000000000000000be49b318c9728f3db46993e9ee8990dbfce080c6161415610e345760405162461bcd60e51b8152600401610c6490613f64565b7f000000000000000000000000be49b318c9728f3db46993e9ee8990dbfce080c66001600160a01b0316610e66611ef4565b6001600160a01b031614610e8c5760405162461bcd60e51b8152600401610c6490613fb0565b610e9582611f10565b610ea18282600161204b565b5050565b600054610100900460ff1615808015610ec55750600054600160ff909116105b80610edf5750303b158015610edf575060005460ff166001145b610f425760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c64565b6000805460ff191660011790558015610f65576000805461ff0019166101001790555b6001600160a01b0389161580610f8257506001600160a01b038816155b80610f9457506001600160a01b038616155b80610fa657506001600160a01b038716155b15610fc45760405163e481c26960e01b815260040160405180910390fd5b610fcd896123f5565b610fd688612435565b610fe0858561247f565b610fec61c4e088612546565b610ff6838361258e565b61026580546001600160a01b0319166001600160a01b0388161790558015611058576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b6000306001600160a01b037f000000000000000000000000be49b318c9728f3db46993e9ee8990dbfce080c616146111035760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610c64565b5060008051602061424b83398151915290565b6000611120611ef4565b905090565b61015f546001600160a01b0316331461115157604051630782484160e21b815260040160405180910390fd5b610ea182826126f2565b61116361279f565b6109b5816127f9565b611174611c70565b61117c612864565b60005b815181101561123a57600082828151811061119c5761119c613ffc565b602002602001015190506000806111b386846128be565b9150915060006111c282612c3f565b604051638e433bc760e01b8152600481018590523060248201529091506001600160a01b03821690638e433bc790604401600060405180830381600087803b15801561120d57600080fd5b505af1158015611221573d6000803e3d6000fd5b50505050505050508061123390614028565b905061117f565b50610ea1600160fb55565b61124d61279f565b610d7f6000612c69565b6001600160a01b03821660009081526101fc6020908152604080832080548251818502810185019093528083528493849084015b828210156113af5760008481526020908190206040805160c0810182526004860290920180546001600160601b0381168452600160601b810463ffffffff1694840194909452600160801b9093046001600160801b03169082015260018201546001600160a01b039081166060830152600283015416608082015260038201805491929160a08401919061131e90614043565b80601f016020809104026020016040519081016040528092919081815260200182805461134a90614043565b80156113975780601f1061136c57610100808354040283529160200191611397565b820191906000526020600020905b81548152906001019060200180831161137a57829003601f168201915b5050505050815250508152602001906001019061128b565b505050509050805183106113d65760405163251f56a160e21b815260040160405180910390fd5b6001600160a01b03841660009081526101c6602052604090205460ff1615611402576000915050611478565b600061142a82858151811061141957611419613ffc565b602002602001015160800151612cbb565b5090508082858151811061144057611440613ffc565b6020026020010151600001516001600160601b031661145f919061407e565b43101561147157600092505050611478565b6001925050505b92915050565b61015f546001600160a01b031633146114aa57604051630782484160e21b815260040160405180910390fd5b6109b581612d4e565b61015f546001600160a01b031633146114df57604051630782484160e21b815260040160405180910390fd5b6109b581612db9565b61015f546001600160a01b0316331461151457604051630782484160e21b815260040160405180910390fd5b6109b581612dfc565b611525611c70565b61152e83611cb6565b604051638340f54960e01b81526001600160a01b03838116600483015233602483018190526044830184905291600091861690638340f549906064016020604051808303816000875af1158015611589573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ad9190614096565b905060006115ba85612c3f565b6040516319157fab60e21b8152600481018490526001600160a01b03858116602483015291925090821690636455feac90604401600060405180830381600087803b15801561160857600080fd5b505af115801561161c573d6000803e3d6000fd5b5050604080516001600160a01b03808b168252891660208201529081018590527f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62925060600190505b60405180910390a1505050505050565b61015f546001600160a01b031633146116a157604051630782484160e21b815260040160405180910390fd5b610d7f612e54565b61015f546001600160a01b031633146116d557604051630782484160e21b815260040160405180910390fd5b610ea18282612e91565b61015f546001600160a01b0316331461170b57604051630782484160e21b815260040160405180910390fd5b610ea18282612fdc565b61015f546001600160a01b0316331461174157604051630782484160e21b815260040160405180910390fd5b610ea1828261303d565b610265546001600160a01b0316331461177757604051630782484160e21b815260040160405180910390fd5b61178083611cf0565b61179d5760405163981a2a2b60e01b815260040160405180910390fd5b6001600160a01b0383166000908152610193602052604090205460ff16156117d75760405162411eb960e91b815260040160405180910390fd5b6001600160a01b0382166117fe5760405163e481c26960e01b815260040160405180910390fd5b600061180984612c3f565b6040516319157fab60e21b8152600481018490526001600160a01b03858116602483015291925090821690636455feac90604401600060405180830381600087803b15801561185757600080fd5b505af115801561186b573d6000803e3d6000fd5b5050505050505050565b6101c7546001600160a01b031633146118a157604051630782484160e21b815260040160405180910390fd5b6001600160a01b03811660008181526101c66020908152604091829020805460ff1916905590519182527fd7e9ec6e6ecd65492dce6bf513cd6867560d49544421d0783ddf06e76c24470c9101610975565b6001600160a01b03811660009081526101fc60209081526040808320805482518185028101850190935280835260609492939192909184015b82821015611a505760008481526020908190206040805160c0810182526004860290920180546001600160601b0381168452600160601b810463ffffffff1694840194909452600160801b9093046001600160801b03169082015260018201546001600160a01b039081166060830152600283015416608082015260038201805491929160a0840191906119bf90614043565b80601f01602080910402602001604051908101604052809291908181526020018280546119eb90614043565b8015611a385780601f10611a0d57610100808354040283529160200191611a38565b820191906000526020600020905b815481529060010190602001808311611a1b57829003601f168201915b5050505050815250508152602001906001019061192c565b505050509050919050565b611a6361279f565b6001600160a01b038116611ac85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c64565b6109b581612c69565b61015f546001600160a01b03163314611afd57604051630782484160e21b815260040160405180910390fd5b61026554604080516001600160a01b03928316815291831660208301527f93997aab8946fde90e9e1d1397b7cae93fdff13d08b6cd1e1b609b170c08225a910160405180910390a161026580546001600160a01b0319166001600160a01b0392909216919091179055565b815181518114611b8b5760405163251f56a160e21b815260040160405180910390fd5b60005b81811015611be257611bd2848281518110611bab57611bab613ffc565b6020026020010151848381518110611bc557611bc5613ffc565b602002602001015161116c565b611bdb81614028565b9050611b8e565b50505050565b611bf1816131b4565b61019280546001810182556000919091527ffcfced99f9d921eebdc59aa6f7a664084bd564a3d2d54ebc1a5c057c99c67aba0180546001600160a01b0319166001600160a01b0383169081179091556040519081527f0e3c58ebfb2e7465fbb1c32e6b4f40c3c4f5ca77e8218a386aff8617831260d790602001610975565b60c95460ff1615610d7f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c64565b6001600160a01b0381166000908152610231602052604090205460ff166109b557604051632efd965160e11b815260040160405180910390fd5b610192546000908190815b81811015611d4d57846001600160a01b03166101928281548110611d2157611d21613ffc565b6000918252602090912001546001600160a01b03161415611d455760019250611d4d565b600101611cfb565b50909392505050565b6001600160a01b0380841660009081526101fc60209081526040808320815160c0810183526001600160601b034381811683528286018781526001600160801b03808c169685019687528d8a16606086019081528f8b166080870190815260a087018d8152885460018181018b55998d529b8b902088516004909d0201805495519a518516600160801b0263ffffffff9b909b16600160601b026fffffffffffffffffffffffffffffffff199096169c9097169b909b1793909317909116969096178355945193820180549489166001600160a01b03199586161790559351600282018054919098169316929092179095559251805191949392611e62926003850192909101906136d9565b5050506001600160a01b03861660009081526101fd602052604081208054859290611e8e90849061407e565b90915550506001600160a01b03841660009081526101fc60205260409020547f971a8a7e3eae1c1f37d2746b98299a55c2f7adec443f81fd2e1fe86fb4e0c86c9086908690611edf906001906140af565b868686604051611665969594939291906140c6565b60008051602061424b833981519152546001600160a01b031690565b611f1861279f565b7ff9f0b6ee2e79f7d431bcdf2c714d0514eb23e8fd461eb6c7aba86125154bf5bf816001600160a01b0316638f940f636040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9b9190614096565b14611fb957604051630ce2ef5f60e11b815260040160405180910390fd5b611fc560026001614113565b60ff16816001600160a01b03166354fd4d506040518163ffffffff1660e01b8152600401602060405180830381865afa158015612006573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061202a9190614138565b60ff16146109b55760405163a9146eeb60e01b815260040160405180910390fd5b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156120835761207e8361326e565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156120dd575060408051601f3d908101601f191682019092526120da91810190614096565b60015b6121405760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610c64565b60008051602061424b83398151915281146121af5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610c64565b5061207e83838361330a565b6121c361332f565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6101925460005b8181101561207e57826001600160a01b0316610192828154811061223a5761223a613ffc565b6000918252602090912001546001600160a01b03161415612387576101926122636001846140af565b8154811061227357612273613ffc565b60009182526020909120015461019280546001600160a01b0390921691839081106122a0576122a0613ffc565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101928054806122e0576122e061415b565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03851682526101939052604090205460ff1615612346576001600160a01b038316600090815261019360205260409020805460ff191690555b6040516001600160a01b03841681527f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc9060200160405180910390a1505050565b600101612214565b620119408111156123b25760405162de26ef60e51b815260040160405180910390fd5b6101fb5460408051918252602082018390527fab3f1d5eaee409b7067167f77f1fa3f8a863366d6fb2b88559cd4f9b8e03e182910160405180910390a16101fb55565b600054610100900460ff1661241c5760405162461bcd60e51b8152600401610c6490614171565b61242581612c69565b61242d613378565b6109b561339f565b600054610100900460ff1661245c5760405162461bcd60e51b8152600401610c6490614171565b61015f80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff166124a65760405162461bcd60e51b8152600401610c6490614171565b60005b8181101561207e5760008383838181106124c5576124c5613ffc565b90506020020160208101906124da9190613787565b90506124e5816131b4565b61019280546001810182556000919091527ffcfced99f9d921eebdc59aa6f7a664084bd564a3d2d54ebc1a5c057c99c67aba0180546001600160a01b0319166001600160a01b039290921691909117905561253f81614028565b90506124a9565b600054610100900460ff1661256d5760405162461bcd60e51b8152600401610c6490614171565b6125768261238f565b61257f816133ce565b50506101fa805460ff19169055565b600054610100900460ff166125b55760405162461bcd60e51b8152600401610c6490614171565b8060005b81811015611be25760008484838181106125d5576125d5613ffc565b90506020020160208101906125ea9190613787565b90506001600160a01b0381166126135760405163e481c26960e01b815260040160405180910390fd5b6001600160a01b0381166000908152610231602052604090205460ff161561264e5760405163cc5fde6960e01b815260040160405180910390fd5b6001600160a01b038116600081815261023160209081526040808320805460ff19166001908117909155610232805491820181559093527fcffd2c2e6f82dfc83b58e2df5c82f2a4b3a3d5a9f68fbfa24b96adf46c00deeb90920180546001600160a01b0319168417905590519182527fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab03910160405180910390a1506001016125b9565b6126fb82611cf0565b6127185760405163981a2a2b60e01b815260040160405180910390fd5b6001600160a01b03828116600090815261019460209081526040918290205482519084168152928416908301527f82e0cebbbfcea0d10cf649041c20143e863ed85b7e3427ac67cf58dd502426ee910160405180910390a16001600160a01b0391821660009081526101946020526040902080546001600160a01b03191691909216179055565b6097546001600160a01b03163314610d7f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c64565b61015f54604080516001600160a01b03928316815291831660208301527ffcde6c827a52b0870bc44ed9b10212272e18c9ea1725b772e9b493750afd8da4910160405180910390a161015f80546001600160a01b0319166001600160a01b0392909216919091179055565b600260fb5414156128b75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c64565b600260fb55565b6001600160a01b03821660009081526101fc60205260408120805482918291859081106128ed576128ed613ffc565b60009182526020918290206040805160c08101825260049390930290910180546001600160601b0381168452600160601b810463ffffffff1694840194909452600160801b9093046001600160801b03169082015260018201546001600160a01b039081166060830152600283015416608082015260038201805491929160a08401919061297a90614043565b80601f01602080910402602001604051908101604052809291908181526020018280546129a690614043565b80156129f35780601f106129c8576101008083540402835291602001916129f3565b820191906000526020600020905b8154815290600101906020018083116129d657829003601f168201915b5050505050815250509050600080612a0e8360800151612cbb565b6040850151919350915043906001600160801b03161580612a385750602084015163ffffffff1615155b80612a5c57506001600160a01b03881660009081526101c6602052604090205460ff165b80612a7b57508351612a789084906001600160601b031661407e565b81105b15612a99576040516302e8145360e61b815260040160405180910390fd5b81612b2157608084015160608501516040808701519051636ce5768960e11b81526001600160a01b0392831660048201528b831660248201526001600160801b03909116604482015291169063d9caed1290606401600060405180830381600087803b158015612b0857600080fd5b505af1158015612b1c573d6000803e3d6000fd5b505050505b6001600160a01b03881660009081526101fc6020526040902080546001919089908110612b5057612b50613ffc565b9060005260206000209060040201600001600c6101000a81548163ffffffff021916908363ffffffff16021790555083604001516001600160801b03166101fd600086608001516001600160a01b03166001600160a01b031681526020019081526020016000206000828254612bc691906140af565b925050819055507faf5c8db005d0f080f251f66754ce27b02ef8fb7674f7c2dea87dc0b5f6e8a1708460600151898987604001518860a0015186604051612c12969594939291906141bc565b60405180910390a150505060408101516060909101516001600160801b03909116925090505b9250929050565b6001600160a01b038082166000908152610194602052604081205490911680611478575090919050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008080806001600160a01b038516600b1415612cdf5750506101fb546001612d44565b846001600160a01b03166361b7a89c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d419190614096565b91505b9094909350915050565b6101c754604080516001600160a01b03928316815291831660208301527f495fcd239ff1c5629c93d3cf8c56e64bb4cb6815e022c1f45ed5263e77ac2f7b910160405180910390a16101c780546001600160a01b0319166001600160a01b0392909216919091179055565b6101fe5460408051918252602082018390527fab23966809ffa340c2171c0e4e053ae7a48aef5c1c71e9a0d06e7419898fe946910160405180910390a16101fe55565b6101fa546040805160ff9092161515825282151560208301527f88912b9442d2d36565a1f9372d2e9afd22c714c396f3c9bd5ac1c482c35a46a2910160405180910390a16101fa805460ff1916911515919091179055565b612e5c611c70565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121f03390565b8060005b81811015611be2576102316000858584818110612eb457612eb4613ffc565b9050602002016020810190612ec99190613787565b6001600160a01b0316815260208101919091526040016000205460ff1615612fd45760006102316000868685818110612f0457612f04613ffc565b9050602002016020810190612f199190613787565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055612f70848483818110612f5657612f56613ffc565b9050602002016020810190612f6b9190613787565b613418565b7fcdd2e9b91a56913d370075169cefa1602ba36be5301664f752192bb1709df757848483818110612fa357612fa3613ffc565b9050602002016020810190612fb89190613787565b6040516001600160a01b03909116815260200160405180910390a15b600101612e95565b60405181151581527f439a1291695561df9ec7072ebfc2354c08833ecb5bb9bad6ec43f8919e889d019060200160405180910390a16001600160a01b0391909116600090815261019360205260409020805460ff1916911515919091179055565b8060005b81811015611be257610231600085858481811061306057613060613ffc565b90506020020160208101906130759190613787565b6001600160a01b0316815260208101919091526040016000205460ff166131ac57600161023160008686858181106130af576130af613ffc565b90506020020160208101906130c49190613787565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905561023284848381811061310157613101613ffc565b90506020020160208101906131169190613787565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b039092169190911790557fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab0384848381811061317b5761317b613ffc565b90506020020160208101906131909190613787565b6040516001600160a01b03909116815260200160405180910390a15b600101613041565b306001600160a01b0316816001600160a01b031663b7e1917c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156131fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061322091906141fe565b6001600160a01b03161461324757604051636448d6e960e11b815260040160405180910390fd5b61325081611cf0565b156109b55760405163f0faeff560e01b815260040160405180910390fd5b6001600160a01b0381163b6132db5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610c64565b60008051602061424b83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6133138361351a565b6000825111806133205750805b1561207e57611be2838361355a565b60c95460ff16610d7f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610c64565b600054610100900460ff16610d7f5760405162461bcd60e51b8152600401610c6490614171565b600054610100900460ff166133c65760405162461bcd60e51b8152600401610c6490614171565b610d7f613586565b600054610100900460ff166133f55760405162461bcd60e51b8152600401610c6490614171565b6101c780546001600160a01b0319166001600160a01b0392909216919091179055565b6102325460005b8181101561207e57826001600160a01b0316610232828154811061344557613445613ffc565b6000918252602090912001546001600160a01b031614156135125761023261346e6001846140af565b8154811061347e5761347e613ffc565b60009182526020909120015461023280546001600160a01b0390921691839081106134ab576134ab613ffc565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506102328054806134eb576134eb61415b565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b60010161341f565b6135238161326e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061357f838360405180606001604052806027815260200161426b602791396135b9565b9392505050565b600054610100900460ff166135ad5760405162461bcd60e51b8152600401610c6490614171565b60c9805460ff19169055565b6060600080856001600160a01b0316856040516135d6919061421b565b600060405180830381855af49150503d8060008114613611576040519150601f19603f3d011682016040523d82523d6000602084013e613616565b606091505b509150915061362786838387613631565b9695505050505050565b6060831561369d578251613696576001600160a01b0385163b6136965760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c64565b50816136a7565b6136a783836136af565b949350505050565b8151156136bf5781518083602001fd5b8060405162461bcd60e51b8152600401610c649190614237565b8280546136e590614043565b90600052602060002090601f016020900481019282613707576000855561374d565b82601f1061372057805160ff191683800117855561374d565b8280016001018555821561374d579182015b8281111561374d578251825591602001919060010190613732565b5061375992915061375d565b5090565b5b80821115613759576000815560010161375e565b6001600160a01b03811681146109b557600080fd5b60006020828403121561379957600080fd5b813561357f81613772565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156137e3576137e36137a4565b604052919050565b600082601f8301126137fc57600080fd5b813567ffffffffffffffff811115613816576138166137a4565b613829601f8201601f19166020016137ba565b81815284602083860101111561383e57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561387157600080fd5b843561387c81613772565b9350602085013561388c81613772565b925060408501359150606085013567ffffffffffffffff8111156138af57600080fd5b6138bb878288016137eb565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156139085783516001600160a01b0316835292840192918401916001016138e3565b50909695505050505050565b60006020828403121561392657600080fd5b5035919050565b6000806040838503121561394057600080fd5b823561394b81613772565b9150602083013567ffffffffffffffff81111561396757600080fd5b613973858286016137eb565b9150509250929050565b60008083601f84011261398f57600080fd5b50813567ffffffffffffffff8111156139a757600080fd5b6020830191508360208260051b8501011115612c3857600080fd5b60008060008060008060008060c0898b0312156139de57600080fd5b88356139e981613772565b975060208901356139f981613772565b96506040890135613a0981613772565b95506060890135613a1981613772565b9450608089013567ffffffffffffffff80821115613a3657600080fd5b613a428c838d0161397d565b909650945060a08b0135915080821115613a5b57600080fd5b50613a688b828c0161397d565b999c989b5096995094979396929594505050565b60008060408385031215613a8f57600080fd5b8235613a9a81613772565b91506020830135613aaa81613772565b809150509250929050565b600067ffffffffffffffff821115613acf57613acf6137a4565b5060051b60200190565b600082601f830112613aea57600080fd5b81356020613aff613afa83613ab5565b6137ba565b82815260059290921b84018101918181019086841115613b1e57600080fd5b8286015b84811015613b395780358352918301918301613b22565b509695505050505050565b60008060408385031215613b5757600080fd5b8235613b6281613772565b9150602083013567ffffffffffffffff811115613b7e57600080fd5b61397385828601613ad9565b60008060408385031215613b9d57600080fd5b8235613ba881613772565b946020939093013593505050565b80151581146109b557600080fd5b600060208284031215613bd657600080fd5b813561357f81613bb6565b600080600060608486031215613bf657600080fd5b8335613c0181613772565b92506020840135613c1181613772565b929592945050506040919091013590565b60008060208385031215613c3557600080fd5b823567ffffffffffffffff811115613c4c57600080fd5b613c588582860161397d565b90969095509350505050565b60008060408385031215613c7757600080fd5b8235613c8281613772565b91506020830135613aaa81613bb6565b60005b83811015613cad578181015183820152602001613c95565b83811115611be25750506000910152565b60008151808452613cd6816020860160208601613c92565b601f01601f19169290920160200192915050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015613da457888303603f19018552815180516001600160601b031684528781015163ffffffff1688850152868101516001600160801b0316878501526060808201516001600160a01b03908116918601919091526080808301519091169085015260a09081015160c091850182905290613d9081860183613cbe565b968901969450505090860190600101613d11565b509098975050505050505050565b600082601f830112613dc357600080fd5b81356020613dd3613afa83613ab5565b82815260059290921b84018101918181019086841115613df257600080fd5b8286015b84811015613b3957803567ffffffffffffffff811115613e165760008081fd5b613e248986838b0101613ad9565b845250918301918301613df6565b60008060408385031215613e4557600080fd5b823567ffffffffffffffff80821115613e5d57600080fd5b818501915085601f830112613e7157600080fd5b81356020613e81613afa83613ab5565b82815260059290921b84018101918181019089841115613ea057600080fd5b948201945b83861015613ec7578535613eb881613772565b82529482019490820190613ea5565b96505086013592505080821115613edd57600080fd5b5061397385828601613db2565b805160028110613ef957600080fd5b919050565b60008060408385031215613f1157600080fd5b613f1a83613eea565b9150613f2860208401613eea565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613f5957600080fd5b815161357f81613bb6565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561403c5761403c614012565b5060010190565b600181811c9082168061405757607f821691505b6020821081141561407857634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561409157614091614012565b500190565b6000602082840312156140a857600080fd5b5051919050565b6000828210156140c1576140c1614012565b500390565b6001600160a01b03878116825286166020820152604081018590526060810184905260c06080820181905260009061410090830185613cbe565b90508260a0830152979650505050505050565b600060ff821660ff84168060ff0382111561413057614130614012565b019392505050565b60006020828403121561414a57600080fd5b815160ff8116811461357f57600080fd5b634e487b7160e01b600052603160045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b03878116825286166020820152604081018590526001600160801b038416606082015260c06080820181905260009061410090830185613cbe565b60006020828403121561421057600080fd5b815161357f81613772565b6000825161422d818460208701613c92565b9190910192915050565b60208152600061357f6020830184613cbe56fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204a21abff54d259f74abdc1146d89b47ea2109d00e4a19f911597dc88c54f0bfc64736f6c634300080c0033
Loading...
Loading
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.