Address Details
contract

0xAf387Ee8dd07696437FEA7f007998bA52fCeb7f1

Contract Name
CeloBridge
Creator
0x4c45c6–9e9f2c at 0xbc4080–d6d73b
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
15830413
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
CeloBridge




Optimization enabled
true
Compiler version
v0.8.7+commit.e28d00a7




Optimization runs
1000
EVM Version
london




Verified at
2022-04-01T16:37:28.973282Z

contracts/CeloBridge/CeloBridge.sol

// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.7;

import "./BaseBridge.sol";
import "./extensions/IERC20.sol";
import "./Validator.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";

/**
 * @title BridgeBank
 * @dev Bank contract which coordinates asset-related functionality.
 *      EthBank manages locking and unlocking of ETH/ERC20 token assets
 *      based on eth.
 **/

contract CeloBridge is
    Initializable,
    BaseBridge,
    PausableUpgradeable,
    OwnableUpgradeable,
    Validator,
    ReentrancyGuardUpgradeable
{
    using SafeERC20 for IERC20;

    address public operator;
    address public timeLockContract;

    /*
     * @dev: Constructor, sets operator
     */
    function initialize(
        address _operatorAddress,
        address _timeLockAddress,
        address _validator
    ) public payable initializer {
        operator = _operatorAddress;
        timeLockContract = _timeLockAddress;
        _addValidator(_validator);
        __ReentrancyGuard_init();
        __Ownable_init();
        __Pausable_init();
    }

    /*
     * @dev: Modifier to restrict access to operator
     */
    modifier onlyOperator() {
        require(msg.sender == operator, "Must be operator.");
        _;
    }

    /*
     * @dev: Modifier to restrict state change to timeLock smart contract
     */
    modifier isTimeLock() {
        require(msg.sender == timeLockContract, "Must be timeLock");
        _;
    }

    /*
     * @dev: Change to new Operator
     *
     */
    event LogChangeOperator(address _oldOperator, address _newOperator);

    function changeOperator(address _newOperator) public isTimeLock {
        require(_newOperator != address(0), "null address");

        emit LogChangeOperator(operator, _newOperator);

        operator = _newOperator;
    }

    /*
     * @dev: Add validator
     *
     */
    function addValidator(address _newValidator) public isTimeLock {
        _addValidator(_newValidator);
    }

    /*
     * @dev: Remove validator
     *
     */
    function removeValidator(address _validator) public isTimeLock {
        _removeValidator(_validator);
    }

    /*
     * @dev: Fallback function allows anyone to send funds to the bank directly
     *
     */

    fallback() external payable {}
    receive() external payable {}

    /**
     * @dev Pauses all functions.
     * Set timestamp for current pause
     * No need to reset pausedAt when pausing it will automatically increase
     */
    function pause() public isTimeLock {
        _pause();
    }

    /**
     * @dev Unpauses all functions.
     */
    function unpause() public isTimeLock {
        _unpause();
    }

    /*
     * @dev: Locks received CELO/ERC20 funds.
     *
     * @param _recipient: representation of destination address.
     * @param _token: token address in origin chain (0x0 if ethereum)
     * @param _amount: value of deposit
     */
    function lock(
        address _recipient,
        address _token,
        uint256 _amount,
        string memory _chainName
    ) public payable whenNotPaused nonReentrant {
        string memory symbol;

        // ETH deposit
        if (msg.value > 0) {
            require(_token == address(0), "Not null address");
            require(msg.value == _amount, "CELO != _amount");
            symbol = "CELO";

            lockFunds(
                payable(msg.sender),
                _recipient,
                _token,
                symbol,
                _amount,
                _chainName
            );
        }
        // ERC20 deposit
        else {
            address thisadd = address(this);
            uint256 beforeLock = IERC20(_token).balanceOf(thisadd);

            IERC20(_token).safeTransferFrom(msg.sender, thisadd, _amount);

            uint256 afterLock = IERC20(_token).balanceOf(thisadd);

            // Set symbol to the ERC20 token's symbol
            symbol = IERC20(_token).symbol();

            lockFunds(
                payable(msg.sender),
                _recipient,
                _token,
                symbol,
                afterLock - beforeLock,
                _chainName
            );
        }
    }

    /*
     * @dev: Unlocks CELO and ERC20 tokens held on the contract.
     *
     * @param _recipient: recipient's is an evry address
     * @param _token: token contract address
     * @param _symbol: token symbol
     * @param _amount: wei amount or ERC20 token count
     *
     * This functions is use for unlock IBC assets
     * - Operator send the
     */
    
    function unlock(
        uint8[] memory sigV,
        bytes32[] memory sigR,
        bytes32[] memory sigS,
        address payable _recipient,
        address tokenAddress,
        string memory _symbol,
        uint256 _amount,
        uint256 _fee,
        bytes32 _interchainTX
    )
        public
        onlyOperator
        whenNotPaused
        nonReentrant
        validatorPrecheck(sigV, sigR, sigS)
    {
        require(_amount > _fee, "Input amount <= fee");

        require(
            _checkUnlockSig(
                sigV,
                sigR,
                sigS,
                _recipient,
                tokenAddress,
                _symbol,
                _amount,
                _interchainTX
            ),
            "Invalid signature"
        );

        require(
            unlockCompleted[_interchainTX].isUnlocked == false,
            "Processed before"
        );

        // Check if it is CELO
        address thisadd = address(this);
        if (tokenAddress == address(0)) {
            require(thisadd.balance >= _amount, "Insufficient balance.");
        } else {
            require(
                IERC20(tokenAddress).balanceOf(thisadd) >= _amount,
                "Insufficient ERC20 balance."
            );
        }

        unlockFunds(
            _recipient,
            payable(owner()),
            tokenAddress,
            _symbol,
            _amount,
            _fee,
            _interchainTX
        );
    }

    function emergencyWithdraw(
        uint8[] memory sigV,
        bytes32[] memory sigR,
        bytes32[] memory sigS,
        address tokenAddress,
        uint256 _amount
    )
        public
        onlyOperator
        whenPaused
        nonReentrant
        validatorPrecheck(sigV, sigR, sigS)
    {
        require(
            _checkEmergencySig(sigV, sigR, sigS, tokenAddress, _amount),
            "Invalid signature"
        );
        // Check if it is CELO
        address thisadd = address(this);
        if (tokenAddress == address(0)) {
            require(thisadd.balance >= _amount, "Insufficient balance.");
            payable(msg.sender).transfer(_amount);
        } else {
            require(
                IERC20(tokenAddress).balanceOf(thisadd) >= _amount,
                "Insufficient ERC20 balance."
            );
            IERC20(tokenAddress).safeTransfer(owner(), _amount);
        }
    }

    /*
     * @dev: refunds CELOO and ERC20 tokens held on the contract.
     *
     * @param _recipient: recipient's is an evry address
     * @param _token: token contract address
     * @param _symbol: token symbol
     * @param _amount: wei amount or ERC20 token count
     */
    function refund(
        uint8[] memory sigV,
        bytes32[] memory sigR,
        bytes32[] memory sigS,
        address payable _recipient,
        address _tokenAddress,
        string memory _symbol,
        uint256 _amount,
        uint256 _nonce
    )
        public
        onlyOperator
        whenNotPaused
        nonReentrant
        validatorPrecheck(sigV, sigR, sigS)
    {
        require(
            _checkRefundSig(
                sigV,
                sigR,
                sigS,
                _recipient,
                _tokenAddress,
                _symbol,
                _amount,
                _nonce
            ),
            "Invalid signature"
        );
        require(
            refundCompleted[_nonce].isRefunded == false,
            "Processed before"
        );
        require(
            refundCompleted[_nonce].tokenAddress == _tokenAddress,
            "Invalid tokenAdress"
        );
        require(
            refundCompleted[_nonce].sender == _recipient,
            "Invalid recipient"
        );
        require(refundCompleted[_nonce].amount == _amount, "Invalid amount");
        // Check if it is CELO
        address thisadd = address(this);
        if (_tokenAddress == address(0)) {
            require(
                thisadd.balance >= _amount,
                "Insufficient evry for delivery."
            );
        } else {
            require(
                IERC20(_tokenAddress).balanceOf(thisadd) >= _amount,
                "Insufficient erc20 for delivery."
            );
        }
        refunds(_recipient, _tokenAddress, _symbol, _amount, _nonce);
    }

    /*
     * @dev: For validators to get the lock data in order to verify
     *       if it is correct data that they need to verify with signature
     *
     * @param _recipient: Nonce Number
     * @return lockData
     */
    function getLockData(uint256 _nonce)
        public
        view
        returns (
            bool,
            uint256,
            address,
            address,
            uint256,
            string memory
        )
    {
        return _getLockData(_nonce);
    }

    // This function check the mapping to see if the transaction  is unlockeds
    function checkIsUnlocked(bytes32 _interchainTX) public view returns (bool) {
        return unlockCompleted[_interchainTX].isUnlocked;
    }
}
        

/_openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
          

/_openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}
          

/_openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

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.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}
          

/_openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        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;
}
          

/_openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @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;
}
          

/_openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
          

/_openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}
          

/contracts/CeloBridge/BaseBridge.sol

// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.7;

import "./extensions/SafeERC20.sol";

/*
 *  @title: EvrnetBank
 *  @dev: Eth bank which locks ETH/ERC20 token deposits, and unlocks
 *        ETH/ERC20 tokens once the prophecy has been successfully processed.
 */
contract BaseBridge {
    using SafeERC20 for IERC20;

    uint256 public lockBurnNonce;

    struct RefundData {
        bool isRefunded;
        uint256 nonce;
        address sender;
        address tokenAddress;
        uint256 amount;
        string chainName;
    }
    struct UnlockData {
        bool isUnlocked;
        address operator;
        address recipient;
        address tokenAddress;
        uint256 amount;
    }
    // Mapping and check if the refunds transaction is completed
    mapping(uint256 => RefundData) internal refundCompleted;
    // Mapping and check if the unlock transaction is completed
    mapping(bytes32 => UnlockData) internal unlockCompleted;

    // For erc20
    /*
     * @dev: Event declarations
     */
    event LogLock(
        address _from,
        address _to,
        address _token,
        string _symbol,
        uint256 _value,
        uint256 _nonce,
        string _chainName
    );

    event LogUnlock(
        address _to,
        address _token,
        string _symbol,
        uint256 _value,
        bytes32 _interchainTX
    );

    event LogRefund(
        address _to,
        address _token,
        string _symbol,
        uint256 _value,
        uint256 _nonce
    );

    event LogUnlockFee(
        address _owner,
        address _token,
        string _symbol,
        uint256 _fee,
        bytes32 _interchainTX
    );

    /*
     * @dev: Gets the amount of locked/funded tokens by address.
     *
     * @param _symbol: The asset's symbol.
     */
    function getLockedFunds(address _token) public view returns (uint256) {
        address thisadd = address(this);
        if (_token == address(0)) {
            return thisadd.balance;
        }
        return IERC20(_token).balanceOf(thisadd);
    }

    /*
     * @dev: Creates a new Evrynet deposit with a unique id.
     *
     * @param _sender: The sender's ethereum address.
     * @param _recipient: The intended recipient's evrnet address.
     * @param _token: The currency type, either erc20 or ethereum.
     * @param _amount: The amount of erc20 tokens/ ethereum (in wei) to be itemized.
     */
    function lockFunds(
        address payable _sender,
        address _recipient,
        address _token,
        string memory _symbol,
        uint256 _amount,
        string memory _chainName
    ) internal {
        lockBurnNonce++;

        refundCompleted[lockBurnNonce] = RefundData(
            false,
            lockBurnNonce,
            _sender,
            _token,
            _amount,
            _chainName
        );

        emit LogLock(
            _sender,
            _recipient,
            _token,
            _symbol,
            _amount,
            lockBurnNonce,
            _chainName
        );
    }

    /*
     * @dev: Unlocks funds held on contract and sends them to the
     *       intended recipient
     *
     * @param _recipient: recipient's Evrynet address
     * @param _token: token contract address
     * @param _symbol: token symbol
     * @param _amount: wei amount or ERC20 token count
     */
    function unlockFunds(
        address payable _recipient,
        address payable _owner,
        address _token,
        string memory _symbol,
        uint256 _amount,
        uint256 _fee,
        bytes32 _interchainTX
    ) internal {
        // Transfer funds to intended recipient
        if (_token == address(0)) {
            _recipient.transfer(_amount - _fee);
            _owner.transfer(_fee);
        } else {
            IERC20(_token).safeTransfer(_recipient, _amount - _fee);
            IERC20(_token).safeTransfer(_owner, _fee);
        }
        unlockCompleted[_interchainTX] = UnlockData(
            true,
            address(this),
            _recipient,
            _token,
            _amount
        );

        emit LogUnlock(
            _recipient,
            _token,
            _symbol,
            _amount - _fee,
            _interchainTX
        );
        emit LogUnlockFee(_owner, _token, _symbol, _fee, _interchainTX);
    }

    /*
     * @dev: Unlocks funds held on contract and sends them to the
     *       intended recipient
     *
     * @param _recipient: recipient's Evrynet address
     * @param _token: token contract address
     * @param _symbol: token symbol
     * @param _amount: wei amount or ERC20 token count
     */
    function refunds(
        address payable _recipient,
        address _tokenAddress,
        string memory _symbol,
        uint256 _amount,
        uint256 _nonce
    ) internal {
        // Transfer funds to intended recipient
        if (_tokenAddress == address(0)) {
            _recipient.transfer(_amount);        
        } else {
            IERC20(_tokenAddress).safeTransfer(
                _recipient,
                _amount
            );
        }
        refundCompleted[_nonce].isRefunded = true;

        emit LogRefund(_recipient, _tokenAddress, _symbol, _amount, _nonce);
    }

    // For validator to check if evrything in data is correct
    function _getLockData(uint256 _nonce)
        internal
        view
        returns (
            bool,
            uint256,
            address,
            address,
            uint256,
            string memory
        )
    {
        return (
            refundCompleted[_nonce].isRefunded,
            refundCompleted[_nonce].nonce,
            refundCompleted[_nonce].sender,
            refundCompleted[_nonce].tokenAddress,
            refundCompleted[_nonce].amount,
            refundCompleted[_nonce].chainName
        );
    }
}
          

/contracts/CeloBridge/Validator.sol

// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.7;

/**
 * @title Validator
 * @dev To handle the multisig
 * Author: luc.vu
 * Company: sotatek.com
 **/

contract Validator {
    address[] private validators;
    // Fixed threshold to validate unlock/refund/emergency withdraw equal or more than 2/3 signatures
    uint256 private constant threshold = 66;

    function getValidators() public view returns (address[] memory) {
        return validators;
    }

    event LogAddValidator(address _validator);

    function _addValidator(address _validator) internal {
        require(_validator != address(0), "Null address");
        for (uint256 index = 0; index < validators.length; index++) {
            require(_validator != validators[index], "Already added");
        }
        validators.push(_validator);

        emit LogAddValidator(_validator);
    }

    event LogRemoveValidator(address _validator);

    function _removeValidator(address _validator) internal {
        for (uint256 index = 0; index < validators.length; index++) {
            if (_validator == validators[index]) {
                validators[index] = validators[validators.length - 1];
                validators.pop();
                emit LogRemoveValidator(_validator);
                return;
            }
        }
        require(false, "Could not find validator to remove");
    }

    function _checkSignature(
        uint8 _sigV,
        bytes32 _sigR,
        bytes32 _sigS,
        bytes32 _inputHash
    ) private view returns (bool) {
        address checkAdress = ecrecover(
            keccak256(
                abi.encodePacked("\x19Ethereum Signed Message:\n32", _inputHash)
            ),
            _sigV,
            _sigR,
            _sigS
        );
        for (uint256 index = 0; index < validators.length; index++) {
            if (checkAdress == validators[index]) {
                return true;
            }
        }
        return false;
    }

    function _checkUnlockSig(
        uint8[] memory sigV,
        bytes32[] memory sigR,
        bytes32[] memory sigS,
        address payable _recipient,
        address tokenAddress,
        string memory _symbol,
        uint256 _amount,
        bytes32 _interchainTX
    ) internal view returns (bool) {
        bytes32 funcHash = keccak256("unlock");
        bytes32 symbolHash = keccak256(bytes(_symbol));

        // digest the data to transactionHash
        bytes32 inputHash = keccak256(
            abi.encode(
                funcHash,
                _recipient,
                tokenAddress,
                symbolHash,
                _amount,
                _interchainTX
            )
        );
        for (uint256 index = 0; index < sigV.length; index++) {
            // address recoveredAddress = ecrecover(inputHash, sigV[index], sigR[index], sigS[index]);
            if (
                !_checkSignature(
                    sigV[index],
                    sigR[index],
                    sigS[index],
                    inputHash
                )
            ) return false;
        }
        return true;
    }

    function _checkRefundSig(
        uint8[] memory sigV,
        bytes32[] memory sigR,
        bytes32[] memory sigS,
        address payable _recipient,
        address tokenAddress,
        string memory _symbol,
        uint256 _amount,
        uint256 _nonce
    ) internal view returns (bool) {
        bytes32 funcHash = keccak256("refund");
        bytes32 symbolHash = keccak256(bytes(_symbol));

        // digest the data to transactionHash
        bytes32 inputHash = keccak256(
            abi.encode(
                funcHash,
                _recipient,
                tokenAddress,
                symbolHash,
                _amount,
                _nonce
            )
        );
        for (uint256 index = 0; index < sigV.length; index++) {
            // address recoveredAddress = ecrecover(inputHash, sigV[index], sigR[index], sigS[index]);
            if (
                !_checkSignature(
                    sigV[index],
                    sigR[index],
                    sigS[index],
                    inputHash
                )
            ) return false;
        }
        return true;
    }

    function _checkEmergencySig(
        uint8[] memory sigV,
        bytes32[] memory sigR,
        bytes32[] memory sigS,
        address tokenAddress,
        uint256 _amount
    ) internal view returns (bool) {
        bytes32 funcHash = keccak256("emergencyWithdraw");
        // digest the data to transactionHash
        bytes32 inputHash = keccak256(
            abi.encode(funcHash, tokenAddress, _amount)
        );
        for (uint256 index = 0; index < sigV.length; index++) {
            // address recoveredAddress = ecrecover(inputHash, sigV[index], sigR[index], sigS[index]);
            if (
                !_checkSignature(
                    sigV[index],
                    sigR[index],
                    sigS[index],
                    inputHash
                )
            ) return false;
        }
        return true;
    }

    modifier validatorPrecheck(
        uint8[] memory _sigV,
        bytes32[] memory _sigR,
        bytes32[] memory _sigS
    ) {
        require(
            _sigV.length == _sigR.length &&
                _sigR.length == _sigS.length &&
                _sigV.length > 0,
            "validator(s) is empty"
        );

        require(
            (_sigV.length * 100) / validators.length >= threshold,
            "Threshold not reached"
        );

        if (_sigV.length >= 2) {
            for (uint256 i = 0; i < _sigV.length; i++) {
                for (uint256 j = i + 1; j < _sigV.length; j++) {
                    require(
                        keccak256(
                            abi.encodePacked(_sigV[i], _sigR[i], _sigS[i])
                        ) !=
                            keccak256(
                                abi.encodePacked(_sigV[j], _sigR[j], _sigS[j])
                            ),
                        "Can not be the same signature"
                    );
                }
            }
        }
        _;
    }
}
          

/contracts/CeloBridge/extensions/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);


    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}
          

/contracts/CeloBridge/extensions/SafeERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Address.sol";
import "./IERC20.sol";

library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}
          

Contract ABI

[{"type":"event","name":"LogAddValidator","inputs":[{"type":"address","name":"_validator","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"LogChangeOperator","inputs":[{"type":"address","name":"_oldOperator","internalType":"address","indexed":false},{"type":"address","name":"_newOperator","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"LogLock","inputs":[{"type":"address","name":"_from","internalType":"address","indexed":false},{"type":"address","name":"_to","internalType":"address","indexed":false},{"type":"address","name":"_token","internalType":"address","indexed":false},{"type":"string","name":"_symbol","internalType":"string","indexed":false},{"type":"uint256","name":"_value","internalType":"uint256","indexed":false},{"type":"uint256","name":"_nonce","internalType":"uint256","indexed":false},{"type":"string","name":"_chainName","internalType":"string","indexed":false}],"anonymous":false},{"type":"event","name":"LogRefund","inputs":[{"type":"address","name":"_to","internalType":"address","indexed":false},{"type":"address","name":"_token","internalType":"address","indexed":false},{"type":"string","name":"_symbol","internalType":"string","indexed":false},{"type":"uint256","name":"_value","internalType":"uint256","indexed":false},{"type":"uint256","name":"_nonce","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"LogRemoveValidator","inputs":[{"type":"address","name":"_validator","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"LogUnlock","inputs":[{"type":"address","name":"_to","internalType":"address","indexed":false},{"type":"address","name":"_token","internalType":"address","indexed":false},{"type":"string","name":"_symbol","internalType":"string","indexed":false},{"type":"uint256","name":"_value","internalType":"uint256","indexed":false},{"type":"bytes32","name":"_interchainTX","internalType":"bytes32","indexed":false}],"anonymous":false},{"type":"event","name":"LogUnlockFee","inputs":[{"type":"address","name":"_owner","internalType":"address","indexed":false},{"type":"address","name":"_token","internalType":"address","indexed":false},{"type":"string","name":"_symbol","internalType":"string","indexed":false},{"type":"uint256","name":"_fee","internalType":"uint256","indexed":false},{"type":"bytes32","name":"_interchainTX","internalType":"bytes32","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"fallback","stateMutability":"payable"},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addValidator","inputs":[{"type":"address","name":"_newValidator","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeOperator","inputs":[{"type":"address","name":"_newOperator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"checkIsUnlocked","inputs":[{"type":"bytes32","name":"_interchainTX","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[{"type":"uint8[]","name":"sigV","internalType":"uint8[]"},{"type":"bytes32[]","name":"sigR","internalType":"bytes32[]"},{"type":"bytes32[]","name":"sigS","internalType":"bytes32[]"},{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"string","name":"","internalType":"string"}],"name":"getLockData","inputs":[{"type":"uint256","name":"_nonce","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getLockedFunds","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getValidators","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_operatorAddress","internalType":"address"},{"type":"address","name":"_timeLockAddress","internalType":"address"},{"type":"address","name":"_validator","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"lock","inputs":[{"type":"address","name":"_recipient","internalType":"address"},{"type":"address","name":"_token","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"string","name":"_chainName","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lockBurnNonce","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"operator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"refund","inputs":[{"type":"uint8[]","name":"sigV","internalType":"uint8[]"},{"type":"bytes32[]","name":"sigR","internalType":"bytes32[]"},{"type":"bytes32[]","name":"sigS","internalType":"bytes32[]"},{"type":"address","name":"_recipient","internalType":"address payable"},{"type":"address","name":"_tokenAddress","internalType":"address"},{"type":"string","name":"_symbol","internalType":"string"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"uint256","name":"_nonce","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeValidator","inputs":[{"type":"address","name":"_validator","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"timeLockContract","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unlock","inputs":[{"type":"uint8[]","name":"sigV","internalType":"uint8[]"},{"type":"bytes32[]","name":"sigR","internalType":"bytes32[]"},{"type":"bytes32[]","name":"sigS","internalType":"bytes32[]"},{"type":"address","name":"_recipient","internalType":"address payable"},{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"string","name":"_symbol","internalType":"string"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"uint256","name":"_fee","internalType":"uint256"},{"type":"bytes32","name":"_interchainTX","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b50613c38806100206000396000f3fe6080604052600436106101565760003560e01c8063715018a6116100bf578063aa3fe35811610079578063cda021b011610056578063cda021b014610389578063db930bac146103bb578063f2fde38b146103eb57005b8063aa3fe35814610341578063b7ab4db514610354578063c0c53b8b1461037657005b80638456cb59116100a75780638456cb59146102ee5780638da5cb5b14610303578063a7f01e4d1461032157005b8063715018a6146102b95780637a568fb2146102ce57005b806340a141ff11610110578063570ca735116100f8578063570ca735146102555780635b6a91ad146102755780635c975abb1461029557005b806340a141ff146102155780634d238c8e1461023557005b80631deed3bb1161013e5780631deed3bb1461019f5780632f660362146101c85780633f4ba83a1461020057005b806306394c9b1461015f578063100beeef1461017f57005b3661015d57005b005b34801561016b57600080fd5b5061015d61017a366004613497565b61040b565b34801561018b57600080fd5b5061015d61019a366004613739565b61051c565b3480156101ab57600080fd5b506101b560015481565b6040519081526020015b60405180910390f35b3480156101d457600080fd5b5060ce546101e8906001600160a01b031681565b6040516001600160a01b0390911681526020016101bf565b34801561020c57600080fd5b5061015d610aa9565b34801561022157600080fd5b5061015d610230366004613497565b610b00565b34801561024157600080fd5b5061015d610250366004613497565b610b59565b34801561026157600080fd5b5060cd546101e8906001600160a01b031681565b34801561028157600080fd5b5061015d61029036600461356b565b610baf565b3480156102a157600080fd5b5060365460ff165b60405190151581526020016101bf565b3480156102c557600080fd5b5061015d611287565b3480156102da57600080fd5b5061015d6102e936600461364d565b6112eb565b3480156102fa57600080fd5b5061015d6118ed565b34801561030f57600080fd5b506068546001600160a01b03166101e8565b34801561032d57600080fd5b506101b561033c366004613497565b611942565b61015d61034f3660046134ff565b6119e3565b34801561036057600080fd5b50610369611d28565b6040516101bf9190613986565b61015d6103843660046134b4565b611d8a565b34801561039557600080fd5b506103a96103a43660046137fe565b611ea6565b6040516101bf969594939291906139d3565b3480156103c757600080fd5b506102a96103d63660046137fe565b60009081526003602052604090205460ff1690565b3480156103f757600080fd5b5061015d610406366004613497565b611ecd565b60ce546001600160a01b0316331461045d5760405162461bcd60e51b815260206004820152601060248201526f4d7573742062652074696d654c6f636b60801b60448201526064015b60405180910390fd5b6001600160a01b0381166104b35760405162461bcd60e51b815260206004820152600c60248201527f6e756c6c206164647265737300000000000000000000000000000000000000006044820152606401610454565b60cd54604080516001600160a01b03928316815291831660208301527f81c77b74df4c8fe9cec2dc124d2fe8fe53c0306f85d627bdf7a55b3225726c9e910160405180910390a160cd80546001600160a01b0319166001600160a01b0392909216919091179055565b60cd546001600160a01b0316331461056a5760405162461bcd60e51b815260206004820152601160248201527026bab9ba1031329037b832b930ba37b91760791b6044820152606401610454565b60365460ff166105bc5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610454565b6002609b54141561060f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610454565b6002609b819055508484848151835114801561062c575080518251145b8015610639575060008351115b6106855760405162461bcd60e51b815260206004820152601560248201527f76616c696461746f7228732920697320656d70747900000000000000000000006044820152606401610454565b609a54835160429190610699906064613add565b6106a39190613abb565b10156106f15760405162461bcd60e51b815260206004820152601560248201527f5468726573686f6c64206e6f74207265616368656400000000000000000000006044820152606401610454565b60028351106108c05760005b83518110156108be576000610713826001613aa3565b90505b84518110156108ab5784818151811061073157610731613bc1565b602002602001015184828151811061074b5761074b613bc1565b602002602001015184838151811061076557610765613bc1565b602002602001015160405160200161079f9392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b604051602081830303815290604052805190602001208583815181106107c7576107c7613bc1565b60200260200101518584815181106107e1576107e1613bc1565b60200260200101518585815181106107fb576107fb613bc1565b60200260200101516040516020016108359392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b6040516020818303038152906040528051906020012014156108995760405162461bcd60e51b815260206004820152601d60248201527f43616e206e6f74206265207468652073616d65207369676e61747572650000006044820152606401610454565b806108a381613b7a565b915050610716565b50806108b681613b7a565b9150506106fd565b505b6108cd8888888888611fac565b61090d5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610454565b306001600160a01b0386166109a95784816001600160a01b03163110156109765760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e00000000000000000000006044820152606401610454565b604051339086156108fc029087906000818181858888f193505050501580156109a3573d6000803e3d6000fd5b50610a99565b6040516370a0823160e01b81526001600160a01b0382811660048301528691908816906370a082319060240160206040518083038186803b1580156109ed57600080fd5b505afa158015610a01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a259190613885565b1015610a735760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e742045524332302062616c616e63652e00000000006044820152606401610454565b610a99610a886068546001600160a01b031690565b6001600160a01b03881690876120a1565b50506001609b5550505050505050565b60ce546001600160a01b03163314610af65760405162461bcd60e51b815260206004820152601060248201526f4d7573742062652074696d654c6f636b60801b6044820152606401610454565b610afe61214f565b565b60ce546001600160a01b03163314610b4d5760405162461bcd60e51b815260206004820152601060248201526f4d7573742062652074696d654c6f636b60801b6044820152606401610454565b610b56816121eb565b50565b60ce546001600160a01b03163314610ba65760405162461bcd60e51b815260206004820152601060248201526f4d7573742062652074696d654c6f636b60801b6044820152606401610454565b610b568161239b565b60cd546001600160a01b03163314610bfd5760405162461bcd60e51b815260206004820152601160248201527026bab9ba1031329037b832b930ba37b91760791b6044820152606401610454565b60365460ff1615610c435760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610454565b6002609b541415610c965760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610454565b6002609b8190555087878781518351148015610cb3575080518251145b8015610cc0575060008351115b610d0c5760405162461bcd60e51b815260206004820152601560248201527f76616c696461746f7228732920697320656d70747900000000000000000000006044820152606401610454565b609a54835160429190610d20906064613add565b610d2a9190613abb565b1015610d785760405162461bcd60e51b815260206004820152601560248201527f5468726573686f6c64206e6f74207265616368656400000000000000000000006044820152606401610454565b6002835110610f475760005b8351811015610f45576000610d9a826001613aa3565b90505b8451811015610f3257848181518110610db857610db8613bc1565b6020026020010151848281518110610dd257610dd2613bc1565b6020026020010151848381518110610dec57610dec613bc1565b6020026020010151604051602001610e269392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b60405160208183030381529060405280519060200120858381518110610e4e57610e4e613bc1565b6020026020010151858481518110610e6857610e68613bc1565b6020026020010151858581518110610e8257610e82613bc1565b6020026020010151604051602001610ebc9392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b604051602081830303815290604052805190602001201415610f205760405162461bcd60e51b815260206004820152601d60248201527f43616e206e6f74206265207468652073616d65207369676e61747572650000006044820152606401610454565b80610f2a81613b7a565b915050610d9d565b5080610f3d81613b7a565b915050610d84565b505b610f578b8b8b8b8b8b8b8b61250f565b610f975760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610454565b60008481526002602052604090205460ff1615610ff65760405162461bcd60e51b815260206004820152601060248201527f50726f636573736564206265666f7265000000000000000000000000000000006044820152606401610454565b6000848152600260205260409020600301546001600160a01b038881169116146110625760405162461bcd60e51b815260206004820152601360248201527f496e76616c696420746f6b656e416472657373000000000000000000000000006044820152606401610454565b600084815260026020819052604090912001546001600160a01b038981169116146110cf5760405162461bcd60e51b815260206004820152601160248201527f496e76616c696420726563697069656e740000000000000000000000000000006044820152606401610454565b600084815260026020526040902060040154851461112f5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420616d6f756e740000000000000000000000000000000000006044820152606401610454565b306001600160a01b03881661119d5785816001600160a01b03163110156111985760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206576727920666f722064656c69766572792e006044820152606401610454565b611267565b6040516370a0823160e01b81526001600160a01b0382811660048301528791908a16906370a082319060240160206040518083038186803b1580156111e157600080fd5b505afa1580156111f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112199190613885565b10156112675760405162461bcd60e51b815260206004820181905260248201527f496e73756666696369656e7420657263323020666f722064656c69766572792e6044820152606401610454565b611274898989898961261c565b50506001609b5550505050505050505050565b6068546001600160a01b031633146112e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610454565b610afe60006126da565b60cd546001600160a01b031633146113395760405162461bcd60e51b815260206004820152601160248201527026bab9ba1031329037b832b930ba37b91760791b6044820152606401610454565b60365460ff161561137f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610454565b6002609b5414156113d25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610454565b6002609b81905550888888815183511480156113ef575080518251145b80156113fc575060008351115b6114485760405162461bcd60e51b815260206004820152601560248201527f76616c696461746f7228732920697320656d70747900000000000000000000006044820152606401610454565b609a5483516042919061145c906064613add565b6114669190613abb565b10156114b45760405162461bcd60e51b815260206004820152601560248201527f5468726573686f6c64206e6f74207265616368656400000000000000000000006044820152606401610454565b60028351106116835760005b83518110156116815760006114d6826001613aa3565b90505b845181101561166e578481815181106114f4576114f4613bc1565b602002602001015184828151811061150e5761150e613bc1565b602002602001015184838151811061152857611528613bc1565b60200260200101516040516020016115629392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b6040516020818303038152906040528051906020012085838151811061158a5761158a613bc1565b60200260200101518584815181106115a4576115a4613bc1565b60200260200101518585815181106115be576115be613bc1565b60200260200101516040516020016115f89392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b60405160208183030381529060405280519060200120141561165c5760405162461bcd60e51b815260206004820152601d60248201527f43616e206e6f74206265207468652073616d65207369676e61747572650000006044820152606401610454565b8061166681613b7a565b9150506114d9565b508061167981613b7a565b9150506114c0565b505b8486116116d25760405162461bcd60e51b815260206004820152601360248201527f496e70757420616d6f756e74203c3d20666565000000000000000000000000006044820152606401610454565b6116e28c8c8c8c8c8c8c8b61272c565b6117225760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610454565b60008481526003602052604090205460ff16156117815760405162461bcd60e51b815260206004820152601060248201527f50726f636573736564206265666f7265000000000000000000000000000000006044820152606401610454565b306001600160a01b0389166117ef5786816001600160a01b03163110156117ea5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e00000000000000000000006044820152606401610454565b6118b9565b6040516370a0823160e01b81526001600160a01b0382811660048301528891908b16906370a082319060240160206040518083038186803b15801561183357600080fd5b505afa158015611847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186b9190613885565b10156118b95760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e742045524332302062616c616e63652e00000000006044820152606401610454565b6118d98a6118cf6068546001600160a01b031690565b8b8b8b8b8b6127f0565b50506001609b555050505050505050505050565b60ce546001600160a01b0316331461193a5760405162461bcd60e51b815260206004820152601060248201526f4d7573742062652074696d654c6f636b60801b6044820152606401610454565b610afe612a19565b6000306001600160a01b038316611963576001600160a01b03163192915050565b6040516370a0823160e01b81526001600160a01b0382811660048301528416906370a082319060240160206040518083038186803b1580156119a457600080fd5b505afa1580156119b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119dc9190613885565b9392505050565b60365460ff1615611a295760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610454565b6002609b541415611a7c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610454565b6002609b5560603415611b77576001600160a01b03841615611ae05760405162461bcd60e51b815260206004820152601060248201527f4e6f74206e756c6c2061646472657373000000000000000000000000000000006044820152606401610454565b823414611b2f5760405162461bcd60e51b815260206004820152600f60248201527f43454c4f20213d205f616d6f756e7400000000000000000000000000000000006044820152606401610454565b5060408051808201909152600481527f43454c4f000000000000000000000000000000000000000000000000000000006020820152611b72338686848787612a94565b611d1c565b6040516370a0823160e01b81523060048201819052906000906001600160a01b038716906370a082319060240160206040518083038186803b158015611bbc57600080fd5b505afa158015611bd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf49190613885565b9050611c0b6001600160a01b038716338488612bad565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908816906370a082319060240160206040518083038186803b158015611c5057600080fd5b505afa158015611c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c889190613885565b9050866001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015611cc357600080fd5b505afa158015611cd7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611cff9190810190613817565b9350611d1833898987611d128787613afc565b8a612a94565b5050505b50506001609b55505050565b6060609a805480602002602001604051908101604052809291908181526020018280548015611d8057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611d62575b5050505050905090565b600054610100900460ff16611da55760005460ff1615611da9565b303b155b611e1b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610454565b600054610100900460ff16158015611e3d576000805461ffff19166101011790555b60cd80546001600160a01b038087166001600160a01b03199283161790925560ce805492861692909116919091179055611e768261239b565b611e7e612bfe565b611e86612c71565b611e8e612ce4565b8015611ea0576000805461ff00191690555b50505050565b60008060008060006060611eb987612d57565b949c939b5091995097509550909350915050565b6068546001600160a01b03163314611f275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610454565b6001600160a01b038116611fa35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610454565b610b56816126da565b604080517f20c7292276a1ad0f1aeeff84094e2352ef41a1eca212f90ed38a382f9db781d760208083018290526001600160a01b0386168385015260608084018690528451808503909101815260809093019093528151919092012060009190825b88518110156120905761206e89828151811061202c5761202c613bc1565b602002602001015189838151811061204657612046613bc1565b602002602001015189848151811061206057612060613bc1565b602002602001015185612e48565b61207e5760009350505050612098565b8061208881613b7a565b91505061200e565b506001925050505b95945050505050565b6040516001600160a01b03831660248201526044810182905261214a9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612f58565b505050565b60365460ff166121a15760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610454565b6036805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005b609a5481101561232c57609a818154811061220b5761220b613bc1565b6000918252602090912001546001600160a01b038381169116141561231a57609a805461223a90600190613afc565b8154811061224a5761224a613bc1565b600091825260209091200154609a80546001600160a01b03909216918390811061227657612276613bc1565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550609a8054806122b5576122b5613bab565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03841681527fdd96bc48b6e1b9ae69ac902b1ae959e63409015cc2f5a49e0daa49ce65707e29910160405180910390a15050565b8061232481613b7a565b9150506121ee565b5060405162461bcd60e51b815260206004820152602260248201527f436f756c64206e6f742066696e642076616c696461746f7220746f2072656d6f60448201527f76650000000000000000000000000000000000000000000000000000000000006064820152608401610454565b6001600160a01b0381166123f15760405162461bcd60e51b815260206004820152600c60248201527f4e756c6c206164647265737300000000000000000000000000000000000000006044820152606401610454565b60005b609a5481101561248a57609a818154811061241157612411613bc1565b6000918252602090912001546001600160a01b03838116911614156124785760405162461bcd60e51b815260206004820152600d60248201527f416c7265616479206164646564000000000000000000000000000000000000006044820152606401610454565b8061248281613b7a565b9150506123f4565b50609a80546001810182556000919091527f44da158ba27f9252712a74ff6a55c5d531f69609f1f6e7f17c4443a8e2089be40180546001600160a01b0319166001600160a01b0383169081179091556040519081527fa78bf325d6b88cbfc4998ae42fba13344ba200c0042b91e181ae8b6fc99e03579060200160405180910390a150565b8251602080850191909120604080517f4fd967966e6b0ea40f78dff297fed3b472763137dac6cf564d7263e918f425ef8185018190526001600160a01b038a811683850152891660608301526080820184905260a0820187905260c08083018790528351808403909101815260e090920190925280519301929092206000929190835b8c51811015612607576125e48d82815181106125b0576125b0613bc1565b60200260200101518d83815181106125ca576125ca613bc1565b60200260200101518d848151811061206057612060613bc1565b6125f5576000945050505050612610565b806125ff81613b7a565b915050612592565b50600193505050505b98975050505050505050565b6001600160a01b038416612666576040516001600160a01b0386169083156108fc029084906000818181858888f19350505050158015612660573d6000803e3d6000fd5b5061267a565b61267a6001600160a01b03851686846120a1565b60008181526002602052604090819020805460ff19166001179055517f20af07417482d6d169f9e7f626a6b0422f10cc3eb63cc2352f05d6e6635178fd906126cb9087908790879087908790613946565b60405180910390a15050505050565b606880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8251602080850191909120604080517fa1dfce33d7204812f8d9dafa43869bf0d9141cf71a1ca12983bd7b4ceaef5f928185018190526001600160a01b038a811683850152891660608301526080820184905260a0820187905260c08083018790528351808403909101815260e090920190925280519301929092206000929190835b8c51811015612607576127cd8d82815181106125b0576125b0613bc1565b6127de576000945050505050612610565b806127e881613b7a565b9150506127af565b6001600160a01b03851661287a576001600160a01b0387166108fc6128158486613afc565b6040518115909202916000818181858888f1935050505015801561283d573d6000803e3d6000fd5b506040516001600160a01b0387169083156108fc029084906000818181858888f19350505050158015612874573d6000803e3d6000fd5b506128ad565b612899876128888486613afc565b6001600160a01b03881691906120a1565b6128ad6001600160a01b03861687846120a1565b6040805160a08101825260018082523060208084019182526001600160a01b038c81168587019081528b821660608701908152608087018b815260008a8152600395869052989098209651875495518416610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff911515919091167fffffffffffffffffffffff000000000000000000000000000000000000000000909616959095179490941786555193850180549482166001600160a01b0319958616179055915160028501805491909316931692909217905591519101557fa0ae457a913d51a43cb20497ca774edf99b80cb4873201cbcb504e23a288f59e8786866129b78688613afc565b856040516129c9959493929190613946565b60405180910390a17f6e6709603fcfbdd8d59e295a431397566ea1a19fef33c7cb85e1c6dae7d6bf3c8686868585604051612a08959493929190613946565b60405180910390a150505050505050565b60365460ff1615612a5f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610454565b6036805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121ce3390565b60018054906000612aa483613b7a565b90915550506040805160c08101825260008082526001805460208085018281526001600160a01b03808e168789019081528c821660608901908152608089018c815260a08a018c815296895260028087529a9098208951815490151560ff199091161781559351968401969096555197820180549882166001600160a01b0319998a161790559351600382018054919095169716969096179092559151600485015590518051929392612b5d92600585019201906132ae565b50506001546040517f756b2b54528c2354d6d00598af7bfd8baea1ce7dccd87324e5d2fbad7760f1ea9250612b9d918991899189918991899189906138e6565b60405180910390a1505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052611ea09085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016120e6565b600054610100900460ff16612c695760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b610afe61303d565b600054610100900460ff16612cdc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b610afe6130af565b600054610100900460ff16612d4f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b610afe613123565b6000818152600260208190526040822080546001820154928201546003830154600484015460059094018054879687968796879660609660ff9092169593946001600160a01b03918216949190921692918190612db390613b3f565b80601f0160208091040260200160405190810160405280929190818152602001828054612ddf90613b3f565b8015612e2c5780601f10612e0157610100808354040283529160200191612e2c565b820191906000526020600020905b815481529060010190602001808311612e0f57829003601f168201915b5050505050905095509550955095509550955091939550919395565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018290526000908190600190605c0160408051601f198184030181528282528051602091820120600084529083018083525260ff891690820152606081018790526080810186905260a0016020604051602081039080840390855afa158015612ee1573d6000803e3d6000fd5b50505060206040510351905060005b609a54811015612f4957609a8181548110612f0d57612f0d613bc1565b6000918252602090912001546001600160a01b0383811691161415612f3757600192505050612f50565b80612f4181613b7a565b915050612ef0565b5060009150505b949350505050565b6000612fad826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661319a9092919063ffffffff16565b80519091501561214a5780806020019051810190612fcb91906137dc565b61214a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610454565b600054610100900460ff166130a85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b6001609b55565b600054610100900460ff1661311a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b610afe336126da565b600054610100900460ff1661318e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b6036805460ff19169055565b6060612f508484600085856001600160a01b0385163b6131fc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610454565b600080866001600160a01b0316858760405161321891906138ca565b60006040518083038185875af1925050503d8060008114613255576040519150601f19603f3d011682016040523d82523d6000602084013e61325a565b606091505b509150915061326a828286613275565b979650505050505050565b606083156132845750816119dc565b8251156132945782518084602001fd5b8160405162461bcd60e51b81526004016104549190613a13565b8280546132ba90613b3f565b90600052602060002090601f0160209004810192826132dc5760008555613322565b82601f106132f557805160ff1916838001178555613322565b82800160010185558215613322579182015b82811115613322578251825591602001919060010190613307565b5061332e929150613332565b5090565b5b8082111561332e5760008155600101613333565b803561335281613bed565b919050565b600082601f83011261336857600080fd5b8135602061337d61337883613a57565b613a26565b80838252828201915082860187848660051b890101111561339d57600080fd5b60005b858110156133bc578135845292840192908401906001016133a0565b5090979650505050505050565b600082601f8301126133da57600080fd5b813560206133ea61337883613a57565b80838252828201915082860187848660051b890101111561340a57600080fd5b6000805b8681101561343857823560ff81168114613426578283fd5b8552938501939185019160010161340e565b509198975050505050505050565b600082601f83011261345757600080fd5b813561346561337882613a7b565b81815284602083860101111561347a57600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156134a957600080fd5b81356119dc81613bed565b6000806000606084860312156134c957600080fd5b83356134d481613bed565b925060208401356134e481613bed565b915060408401356134f481613bed565b809150509250925092565b6000806000806080858703121561351557600080fd5b843561352081613bed565b9350602085013561353081613bed565b925060408501359150606085013567ffffffffffffffff81111561355357600080fd5b61355f87828801613446565b91505092959194509250565b600080600080600080600080610100898b03121561358857600080fd5b883567ffffffffffffffff808211156135a057600080fd5b6135ac8c838d016133c9565b995060208b01359150808211156135c257600080fd5b6135ce8c838d01613357565b985060408b01359150808211156135e457600080fd5b6135f08c838d01613357565b97506135fe60608c01613347565b965061360c60808c01613347565b955060a08b013591508082111561362257600080fd5b5061362f8b828c01613446565b93505060c0890135915060e089013590509295985092959890939650565b60008060008060008060008060006101208a8c03121561366c57600080fd5b893567ffffffffffffffff8082111561368457600080fd5b6136908d838e016133c9565b9a5060208c01359150808211156136a657600080fd5b6136b28d838e01613357565b995060408c01359150808211156136c857600080fd5b6136d48d838e01613357565b98506136e260608d01613347565b97506136f060808d01613347565b965060a08c013591508082111561370657600080fd5b506137138c828d01613446565b94505060c08a0135925060e08a013591506101008a013590509295985092959850929598565b600080600080600060a0868803121561375157600080fd5b853567ffffffffffffffff8082111561376957600080fd5b61377589838a016133c9565b9650602088013591508082111561378b57600080fd5b61379789838a01613357565b955060408801359150808211156137ad57600080fd5b506137ba88828901613357565b93505060608601356137cb81613bed565b949793965091946080013592915050565b6000602082840312156137ee57600080fd5b815180151581146119dc57600080fd5b60006020828403121561381057600080fd5b5035919050565b60006020828403121561382957600080fd5b815167ffffffffffffffff81111561384057600080fd5b8201601f8101841361385157600080fd5b805161385f61337882613a7b565b81815285602083850101111561387457600080fd5b612098826020830160208601613b13565b60006020828403121561389757600080fd5b5051919050565b600081518084526138b6816020860160208601613b13565b601f01601f19169290920160200192915050565b600082516138dc818460208701613b13565b9190910192915050565b60006001600160a01b03808a168352808916602084015280881660408401525060e0606083015261391a60e083018761389e565b8560808401528460a084015282810360c0840152613938818561389e565b9a9950505050505050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261397260a083018661389e565b606083019490945250608001529392505050565b6020808252825182820181905260009190848201906040850190845b818110156139c75783516001600160a01b0316835292840192918401916001016139a2565b50909695505050505050565b861515815285602082015260006001600160a01b03808716604084015280861660608401525083608083015260c060a083015261261060c083018461389e565b6020815260006119dc602083018461389e565b604051601f8201601f1916810167ffffffffffffffff81118282101715613a4f57613a4f613bd7565b604052919050565b600067ffffffffffffffff821115613a7157613a71613bd7565b5060051b60200190565b600067ffffffffffffffff821115613a9557613a95613bd7565b50601f01601f191660200190565b60008219821115613ab657613ab6613b95565b500190565b600082613ad857634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615613af757613af7613b95565b500290565b600082821015613b0e57613b0e613b95565b500390565b60005b83811015613b2e578181015183820152602001613b16565b83811115611ea05750506000910152565b600181811c90821680613b5357607f821691505b60208210811415613b7457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613b8e57613b8e613b95565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610b5657600080fdfea2646970667358221220710745864c1defcb6ee8926acc64955dee9f16fb3a2cc5ae74b575afc892422c64736f6c63430008070033

Deployed ByteCode

0x6080604052600436106101565760003560e01c8063715018a6116100bf578063aa3fe35811610079578063cda021b011610056578063cda021b014610389578063db930bac146103bb578063f2fde38b146103eb57005b8063aa3fe35814610341578063b7ab4db514610354578063c0c53b8b1461037657005b80638456cb59116100a75780638456cb59146102ee5780638da5cb5b14610303578063a7f01e4d1461032157005b8063715018a6146102b95780637a568fb2146102ce57005b806340a141ff11610110578063570ca735116100f8578063570ca735146102555780635b6a91ad146102755780635c975abb1461029557005b806340a141ff146102155780634d238c8e1461023557005b80631deed3bb1161013e5780631deed3bb1461019f5780632f660362146101c85780633f4ba83a1461020057005b806306394c9b1461015f578063100beeef1461017f57005b3661015d57005b005b34801561016b57600080fd5b5061015d61017a366004613497565b61040b565b34801561018b57600080fd5b5061015d61019a366004613739565b61051c565b3480156101ab57600080fd5b506101b560015481565b6040519081526020015b60405180910390f35b3480156101d457600080fd5b5060ce546101e8906001600160a01b031681565b6040516001600160a01b0390911681526020016101bf565b34801561020c57600080fd5b5061015d610aa9565b34801561022157600080fd5b5061015d610230366004613497565b610b00565b34801561024157600080fd5b5061015d610250366004613497565b610b59565b34801561026157600080fd5b5060cd546101e8906001600160a01b031681565b34801561028157600080fd5b5061015d61029036600461356b565b610baf565b3480156102a157600080fd5b5060365460ff165b60405190151581526020016101bf565b3480156102c557600080fd5b5061015d611287565b3480156102da57600080fd5b5061015d6102e936600461364d565b6112eb565b3480156102fa57600080fd5b5061015d6118ed565b34801561030f57600080fd5b506068546001600160a01b03166101e8565b34801561032d57600080fd5b506101b561033c366004613497565b611942565b61015d61034f3660046134ff565b6119e3565b34801561036057600080fd5b50610369611d28565b6040516101bf9190613986565b61015d6103843660046134b4565b611d8a565b34801561039557600080fd5b506103a96103a43660046137fe565b611ea6565b6040516101bf969594939291906139d3565b3480156103c757600080fd5b506102a96103d63660046137fe565b60009081526003602052604090205460ff1690565b3480156103f757600080fd5b5061015d610406366004613497565b611ecd565b60ce546001600160a01b0316331461045d5760405162461bcd60e51b815260206004820152601060248201526f4d7573742062652074696d654c6f636b60801b60448201526064015b60405180910390fd5b6001600160a01b0381166104b35760405162461bcd60e51b815260206004820152600c60248201527f6e756c6c206164647265737300000000000000000000000000000000000000006044820152606401610454565b60cd54604080516001600160a01b03928316815291831660208301527f81c77b74df4c8fe9cec2dc124d2fe8fe53c0306f85d627bdf7a55b3225726c9e910160405180910390a160cd80546001600160a01b0319166001600160a01b0392909216919091179055565b60cd546001600160a01b0316331461056a5760405162461bcd60e51b815260206004820152601160248201527026bab9ba1031329037b832b930ba37b91760791b6044820152606401610454565b60365460ff166105bc5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610454565b6002609b54141561060f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610454565b6002609b819055508484848151835114801561062c575080518251145b8015610639575060008351115b6106855760405162461bcd60e51b815260206004820152601560248201527f76616c696461746f7228732920697320656d70747900000000000000000000006044820152606401610454565b609a54835160429190610699906064613add565b6106a39190613abb565b10156106f15760405162461bcd60e51b815260206004820152601560248201527f5468726573686f6c64206e6f74207265616368656400000000000000000000006044820152606401610454565b60028351106108c05760005b83518110156108be576000610713826001613aa3565b90505b84518110156108ab5784818151811061073157610731613bc1565b602002602001015184828151811061074b5761074b613bc1565b602002602001015184838151811061076557610765613bc1565b602002602001015160405160200161079f9392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b604051602081830303815290604052805190602001208583815181106107c7576107c7613bc1565b60200260200101518584815181106107e1576107e1613bc1565b60200260200101518585815181106107fb576107fb613bc1565b60200260200101516040516020016108359392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b6040516020818303038152906040528051906020012014156108995760405162461bcd60e51b815260206004820152601d60248201527f43616e206e6f74206265207468652073616d65207369676e61747572650000006044820152606401610454565b806108a381613b7a565b915050610716565b50806108b681613b7a565b9150506106fd565b505b6108cd8888888888611fac565b61090d5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610454565b306001600160a01b0386166109a95784816001600160a01b03163110156109765760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e00000000000000000000006044820152606401610454565b604051339086156108fc029087906000818181858888f193505050501580156109a3573d6000803e3d6000fd5b50610a99565b6040516370a0823160e01b81526001600160a01b0382811660048301528691908816906370a082319060240160206040518083038186803b1580156109ed57600080fd5b505afa158015610a01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a259190613885565b1015610a735760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e742045524332302062616c616e63652e00000000006044820152606401610454565b610a99610a886068546001600160a01b031690565b6001600160a01b03881690876120a1565b50506001609b5550505050505050565b60ce546001600160a01b03163314610af65760405162461bcd60e51b815260206004820152601060248201526f4d7573742062652074696d654c6f636b60801b6044820152606401610454565b610afe61214f565b565b60ce546001600160a01b03163314610b4d5760405162461bcd60e51b815260206004820152601060248201526f4d7573742062652074696d654c6f636b60801b6044820152606401610454565b610b56816121eb565b50565b60ce546001600160a01b03163314610ba65760405162461bcd60e51b815260206004820152601060248201526f4d7573742062652074696d654c6f636b60801b6044820152606401610454565b610b568161239b565b60cd546001600160a01b03163314610bfd5760405162461bcd60e51b815260206004820152601160248201527026bab9ba1031329037b832b930ba37b91760791b6044820152606401610454565b60365460ff1615610c435760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610454565b6002609b541415610c965760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610454565b6002609b8190555087878781518351148015610cb3575080518251145b8015610cc0575060008351115b610d0c5760405162461bcd60e51b815260206004820152601560248201527f76616c696461746f7228732920697320656d70747900000000000000000000006044820152606401610454565b609a54835160429190610d20906064613add565b610d2a9190613abb565b1015610d785760405162461bcd60e51b815260206004820152601560248201527f5468726573686f6c64206e6f74207265616368656400000000000000000000006044820152606401610454565b6002835110610f475760005b8351811015610f45576000610d9a826001613aa3565b90505b8451811015610f3257848181518110610db857610db8613bc1565b6020026020010151848281518110610dd257610dd2613bc1565b6020026020010151848381518110610dec57610dec613bc1565b6020026020010151604051602001610e269392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b60405160208183030381529060405280519060200120858381518110610e4e57610e4e613bc1565b6020026020010151858481518110610e6857610e68613bc1565b6020026020010151858581518110610e8257610e82613bc1565b6020026020010151604051602001610ebc9392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b604051602081830303815290604052805190602001201415610f205760405162461bcd60e51b815260206004820152601d60248201527f43616e206e6f74206265207468652073616d65207369676e61747572650000006044820152606401610454565b80610f2a81613b7a565b915050610d9d565b5080610f3d81613b7a565b915050610d84565b505b610f578b8b8b8b8b8b8b8b61250f565b610f975760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610454565b60008481526002602052604090205460ff1615610ff65760405162461bcd60e51b815260206004820152601060248201527f50726f636573736564206265666f7265000000000000000000000000000000006044820152606401610454565b6000848152600260205260409020600301546001600160a01b038881169116146110625760405162461bcd60e51b815260206004820152601360248201527f496e76616c696420746f6b656e416472657373000000000000000000000000006044820152606401610454565b600084815260026020819052604090912001546001600160a01b038981169116146110cf5760405162461bcd60e51b815260206004820152601160248201527f496e76616c696420726563697069656e740000000000000000000000000000006044820152606401610454565b600084815260026020526040902060040154851461112f5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420616d6f756e740000000000000000000000000000000000006044820152606401610454565b306001600160a01b03881661119d5785816001600160a01b03163110156111985760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206576727920666f722064656c69766572792e006044820152606401610454565b611267565b6040516370a0823160e01b81526001600160a01b0382811660048301528791908a16906370a082319060240160206040518083038186803b1580156111e157600080fd5b505afa1580156111f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112199190613885565b10156112675760405162461bcd60e51b815260206004820181905260248201527f496e73756666696369656e7420657263323020666f722064656c69766572792e6044820152606401610454565b611274898989898961261c565b50506001609b5550505050505050505050565b6068546001600160a01b031633146112e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610454565b610afe60006126da565b60cd546001600160a01b031633146113395760405162461bcd60e51b815260206004820152601160248201527026bab9ba1031329037b832b930ba37b91760791b6044820152606401610454565b60365460ff161561137f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610454565b6002609b5414156113d25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610454565b6002609b81905550888888815183511480156113ef575080518251145b80156113fc575060008351115b6114485760405162461bcd60e51b815260206004820152601560248201527f76616c696461746f7228732920697320656d70747900000000000000000000006044820152606401610454565b609a5483516042919061145c906064613add565b6114669190613abb565b10156114b45760405162461bcd60e51b815260206004820152601560248201527f5468726573686f6c64206e6f74207265616368656400000000000000000000006044820152606401610454565b60028351106116835760005b83518110156116815760006114d6826001613aa3565b90505b845181101561166e578481815181106114f4576114f4613bc1565b602002602001015184828151811061150e5761150e613bc1565b602002602001015184838151811061152857611528613bc1565b60200260200101516040516020016115629392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b6040516020818303038152906040528051906020012085838151811061158a5761158a613bc1565b60200260200101518584815181106115a4576115a4613bc1565b60200260200101518585815181106115be576115be613bc1565b60200260200101516040516020016115f89392919060f89390931b6001600160f81b03191683526001830191909152602182015260410190565b60405160208183030381529060405280519060200120141561165c5760405162461bcd60e51b815260206004820152601d60248201527f43616e206e6f74206265207468652073616d65207369676e61747572650000006044820152606401610454565b8061166681613b7a565b9150506114d9565b508061167981613b7a565b9150506114c0565b505b8486116116d25760405162461bcd60e51b815260206004820152601360248201527f496e70757420616d6f756e74203c3d20666565000000000000000000000000006044820152606401610454565b6116e28c8c8c8c8c8c8c8b61272c565b6117225760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610454565b60008481526003602052604090205460ff16156117815760405162461bcd60e51b815260206004820152601060248201527f50726f636573736564206265666f7265000000000000000000000000000000006044820152606401610454565b306001600160a01b0389166117ef5786816001600160a01b03163110156117ea5760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e00000000000000000000006044820152606401610454565b6118b9565b6040516370a0823160e01b81526001600160a01b0382811660048301528891908b16906370a082319060240160206040518083038186803b15801561183357600080fd5b505afa158015611847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186b9190613885565b10156118b95760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e742045524332302062616c616e63652e00000000006044820152606401610454565b6118d98a6118cf6068546001600160a01b031690565b8b8b8b8b8b6127f0565b50506001609b555050505050505050505050565b60ce546001600160a01b0316331461193a5760405162461bcd60e51b815260206004820152601060248201526f4d7573742062652074696d654c6f636b60801b6044820152606401610454565b610afe612a19565b6000306001600160a01b038316611963576001600160a01b03163192915050565b6040516370a0823160e01b81526001600160a01b0382811660048301528416906370a082319060240160206040518083038186803b1580156119a457600080fd5b505afa1580156119b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119dc9190613885565b9392505050565b60365460ff1615611a295760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610454565b6002609b541415611a7c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610454565b6002609b5560603415611b77576001600160a01b03841615611ae05760405162461bcd60e51b815260206004820152601060248201527f4e6f74206e756c6c2061646472657373000000000000000000000000000000006044820152606401610454565b823414611b2f5760405162461bcd60e51b815260206004820152600f60248201527f43454c4f20213d205f616d6f756e7400000000000000000000000000000000006044820152606401610454565b5060408051808201909152600481527f43454c4f000000000000000000000000000000000000000000000000000000006020820152611b72338686848787612a94565b611d1c565b6040516370a0823160e01b81523060048201819052906000906001600160a01b038716906370a082319060240160206040518083038186803b158015611bbc57600080fd5b505afa158015611bd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf49190613885565b9050611c0b6001600160a01b038716338488612bad565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908816906370a082319060240160206040518083038186803b158015611c5057600080fd5b505afa158015611c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c889190613885565b9050866001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015611cc357600080fd5b505afa158015611cd7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611cff9190810190613817565b9350611d1833898987611d128787613afc565b8a612a94565b5050505b50506001609b55505050565b6060609a805480602002602001604051908101604052809291908181526020018280548015611d8057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611d62575b5050505050905090565b600054610100900460ff16611da55760005460ff1615611da9565b303b155b611e1b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610454565b600054610100900460ff16158015611e3d576000805461ffff19166101011790555b60cd80546001600160a01b038087166001600160a01b03199283161790925560ce805492861692909116919091179055611e768261239b565b611e7e612bfe565b611e86612c71565b611e8e612ce4565b8015611ea0576000805461ff00191690555b50505050565b60008060008060006060611eb987612d57565b949c939b5091995097509550909350915050565b6068546001600160a01b03163314611f275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610454565b6001600160a01b038116611fa35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610454565b610b56816126da565b604080517f20c7292276a1ad0f1aeeff84094e2352ef41a1eca212f90ed38a382f9db781d760208083018290526001600160a01b0386168385015260608084018690528451808503909101815260809093019093528151919092012060009190825b88518110156120905761206e89828151811061202c5761202c613bc1565b602002602001015189838151811061204657612046613bc1565b602002602001015189848151811061206057612060613bc1565b602002602001015185612e48565b61207e5760009350505050612098565b8061208881613b7a565b91505061200e565b506001925050505b95945050505050565b6040516001600160a01b03831660248201526044810182905261214a9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612f58565b505050565b60365460ff166121a15760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610454565b6036805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60005b609a5481101561232c57609a818154811061220b5761220b613bc1565b6000918252602090912001546001600160a01b038381169116141561231a57609a805461223a90600190613afc565b8154811061224a5761224a613bc1565b600091825260209091200154609a80546001600160a01b03909216918390811061227657612276613bc1565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550609a8054806122b5576122b5613bab565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03841681527fdd96bc48b6e1b9ae69ac902b1ae959e63409015cc2f5a49e0daa49ce65707e29910160405180910390a15050565b8061232481613b7a565b9150506121ee565b5060405162461bcd60e51b815260206004820152602260248201527f436f756c64206e6f742066696e642076616c696461746f7220746f2072656d6f60448201527f76650000000000000000000000000000000000000000000000000000000000006064820152608401610454565b6001600160a01b0381166123f15760405162461bcd60e51b815260206004820152600c60248201527f4e756c6c206164647265737300000000000000000000000000000000000000006044820152606401610454565b60005b609a5481101561248a57609a818154811061241157612411613bc1565b6000918252602090912001546001600160a01b03838116911614156124785760405162461bcd60e51b815260206004820152600d60248201527f416c7265616479206164646564000000000000000000000000000000000000006044820152606401610454565b8061248281613b7a565b9150506123f4565b50609a80546001810182556000919091527f44da158ba27f9252712a74ff6a55c5d531f69609f1f6e7f17c4443a8e2089be40180546001600160a01b0319166001600160a01b0383169081179091556040519081527fa78bf325d6b88cbfc4998ae42fba13344ba200c0042b91e181ae8b6fc99e03579060200160405180910390a150565b8251602080850191909120604080517f4fd967966e6b0ea40f78dff297fed3b472763137dac6cf564d7263e918f425ef8185018190526001600160a01b038a811683850152891660608301526080820184905260a0820187905260c08083018790528351808403909101815260e090920190925280519301929092206000929190835b8c51811015612607576125e48d82815181106125b0576125b0613bc1565b60200260200101518d83815181106125ca576125ca613bc1565b60200260200101518d848151811061206057612060613bc1565b6125f5576000945050505050612610565b806125ff81613b7a565b915050612592565b50600193505050505b98975050505050505050565b6001600160a01b038416612666576040516001600160a01b0386169083156108fc029084906000818181858888f19350505050158015612660573d6000803e3d6000fd5b5061267a565b61267a6001600160a01b03851686846120a1565b60008181526002602052604090819020805460ff19166001179055517f20af07417482d6d169f9e7f626a6b0422f10cc3eb63cc2352f05d6e6635178fd906126cb9087908790879087908790613946565b60405180910390a15050505050565b606880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8251602080850191909120604080517fa1dfce33d7204812f8d9dafa43869bf0d9141cf71a1ca12983bd7b4ceaef5f928185018190526001600160a01b038a811683850152891660608301526080820184905260a0820187905260c08083018790528351808403909101815260e090920190925280519301929092206000929190835b8c51811015612607576127cd8d82815181106125b0576125b0613bc1565b6127de576000945050505050612610565b806127e881613b7a565b9150506127af565b6001600160a01b03851661287a576001600160a01b0387166108fc6128158486613afc565b6040518115909202916000818181858888f1935050505015801561283d573d6000803e3d6000fd5b506040516001600160a01b0387169083156108fc029084906000818181858888f19350505050158015612874573d6000803e3d6000fd5b506128ad565b612899876128888486613afc565b6001600160a01b03881691906120a1565b6128ad6001600160a01b03861687846120a1565b6040805160a08101825260018082523060208084019182526001600160a01b038c81168587019081528b821660608701908152608087018b815260008a8152600395869052989098209651875495518416610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff911515919091167fffffffffffffffffffffff000000000000000000000000000000000000000000909616959095179490941786555193850180549482166001600160a01b0319958616179055915160028501805491909316931692909217905591519101557fa0ae457a913d51a43cb20497ca774edf99b80cb4873201cbcb504e23a288f59e8786866129b78688613afc565b856040516129c9959493929190613946565b60405180910390a17f6e6709603fcfbdd8d59e295a431397566ea1a19fef33c7cb85e1c6dae7d6bf3c8686868585604051612a08959493929190613946565b60405180910390a150505050505050565b60365460ff1615612a5f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610454565b6036805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121ce3390565b60018054906000612aa483613b7a565b90915550506040805160c08101825260008082526001805460208085018281526001600160a01b03808e168789019081528c821660608901908152608089018c815260a08a018c815296895260028087529a9098208951815490151560ff199091161781559351968401969096555197820180549882166001600160a01b0319998a161790559351600382018054919095169716969096179092559151600485015590518051929392612b5d92600585019201906132ae565b50506001546040517f756b2b54528c2354d6d00598af7bfd8baea1ce7dccd87324e5d2fbad7760f1ea9250612b9d918991899189918991899189906138e6565b60405180910390a1505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052611ea09085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016120e6565b600054610100900460ff16612c695760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b610afe61303d565b600054610100900460ff16612cdc5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b610afe6130af565b600054610100900460ff16612d4f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b610afe613123565b6000818152600260208190526040822080546001820154928201546003830154600484015460059094018054879687968796879660609660ff9092169593946001600160a01b03918216949190921692918190612db390613b3f565b80601f0160208091040260200160405190810160405280929190818152602001828054612ddf90613b3f565b8015612e2c5780601f10612e0157610100808354040283529160200191612e2c565b820191906000526020600020905b815481529060010190602001808311612e0f57829003601f168201915b5050505050905095509550955095509550955091939550919395565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018290526000908190600190605c0160408051601f198184030181528282528051602091820120600084529083018083525260ff891690820152606081018790526080810186905260a0016020604051602081039080840390855afa158015612ee1573d6000803e3d6000fd5b50505060206040510351905060005b609a54811015612f4957609a8181548110612f0d57612f0d613bc1565b6000918252602090912001546001600160a01b0383811691161415612f3757600192505050612f50565b80612f4181613b7a565b915050612ef0565b5060009150505b949350505050565b6000612fad826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661319a9092919063ffffffff16565b80519091501561214a5780806020019051810190612fcb91906137dc565b61214a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610454565b600054610100900460ff166130a85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b6001609b55565b600054610100900460ff1661311a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b610afe336126da565b600054610100900460ff1661318e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610454565b6036805460ff19169055565b6060612f508484600085856001600160a01b0385163b6131fc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610454565b600080866001600160a01b0316858760405161321891906138ca565b60006040518083038185875af1925050503d8060008114613255576040519150601f19603f3d011682016040523d82523d6000602084013e61325a565b606091505b509150915061326a828286613275565b979650505050505050565b606083156132845750816119dc565b8251156132945782518084602001fd5b8160405162461bcd60e51b81526004016104549190613a13565b8280546132ba90613b3f565b90600052602060002090601f0160209004810192826132dc5760008555613322565b82601f106132f557805160ff1916838001178555613322565b82800160010185558215613322579182015b82811115613322578251825591602001919060010190613307565b5061332e929150613332565b5090565b5b8082111561332e5760008155600101613333565b803561335281613bed565b919050565b600082601f83011261336857600080fd5b8135602061337d61337883613a57565b613a26565b80838252828201915082860187848660051b890101111561339d57600080fd5b60005b858110156133bc578135845292840192908401906001016133a0565b5090979650505050505050565b600082601f8301126133da57600080fd5b813560206133ea61337883613a57565b80838252828201915082860187848660051b890101111561340a57600080fd5b6000805b8681101561343857823560ff81168114613426578283fd5b8552938501939185019160010161340e565b509198975050505050505050565b600082601f83011261345757600080fd5b813561346561337882613a7b565b81815284602083860101111561347a57600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156134a957600080fd5b81356119dc81613bed565b6000806000606084860312156134c957600080fd5b83356134d481613bed565b925060208401356134e481613bed565b915060408401356134f481613bed565b809150509250925092565b6000806000806080858703121561351557600080fd5b843561352081613bed565b9350602085013561353081613bed565b925060408501359150606085013567ffffffffffffffff81111561355357600080fd5b61355f87828801613446565b91505092959194509250565b600080600080600080600080610100898b03121561358857600080fd5b883567ffffffffffffffff808211156135a057600080fd5b6135ac8c838d016133c9565b995060208b01359150808211156135c257600080fd5b6135ce8c838d01613357565b985060408b01359150808211156135e457600080fd5b6135f08c838d01613357565b97506135fe60608c01613347565b965061360c60808c01613347565b955060a08b013591508082111561362257600080fd5b5061362f8b828c01613446565b93505060c0890135915060e089013590509295985092959890939650565b60008060008060008060008060006101208a8c03121561366c57600080fd5b893567ffffffffffffffff8082111561368457600080fd5b6136908d838e016133c9565b9a5060208c01359150808211156136a657600080fd5b6136b28d838e01613357565b995060408c01359150808211156136c857600080fd5b6136d48d838e01613357565b98506136e260608d01613347565b97506136f060808d01613347565b965060a08c013591508082111561370657600080fd5b506137138c828d01613446565b94505060c08a0135925060e08a013591506101008a013590509295985092959850929598565b600080600080600060a0868803121561375157600080fd5b853567ffffffffffffffff8082111561376957600080fd5b61377589838a016133c9565b9650602088013591508082111561378b57600080fd5b61379789838a01613357565b955060408801359150808211156137ad57600080fd5b506137ba88828901613357565b93505060608601356137cb81613bed565b949793965091946080013592915050565b6000602082840312156137ee57600080fd5b815180151581146119dc57600080fd5b60006020828403121561381057600080fd5b5035919050565b60006020828403121561382957600080fd5b815167ffffffffffffffff81111561384057600080fd5b8201601f8101841361385157600080fd5b805161385f61337882613a7b565b81815285602083850101111561387457600080fd5b612098826020830160208601613b13565b60006020828403121561389757600080fd5b5051919050565b600081518084526138b6816020860160208601613b13565b601f01601f19169290920160200192915050565b600082516138dc818460208701613b13565b9190910192915050565b60006001600160a01b03808a168352808916602084015280881660408401525060e0606083015261391a60e083018761389e565b8560808401528460a084015282810360c0840152613938818561389e565b9a9950505050505050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261397260a083018661389e565b606083019490945250608001529392505050565b6020808252825182820181905260009190848201906040850190845b818110156139c75783516001600160a01b0316835292840192918401916001016139a2565b50909695505050505050565b861515815285602082015260006001600160a01b03808716604084015280861660608401525083608083015260c060a083015261261060c083018461389e565b6020815260006119dc602083018461389e565b604051601f8201601f1916810167ffffffffffffffff81118282101715613a4f57613a4f613bd7565b604052919050565b600067ffffffffffffffff821115613a7157613a71613bd7565b5060051b60200190565b600067ffffffffffffffff821115613a9557613a95613bd7565b50601f01601f191660200190565b60008219821115613ab657613ab6613b95565b500190565b600082613ad857634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615613af757613af7613b95565b500290565b600082821015613b0e57613b0e613b95565b500390565b60005b83811015613b2e578181015183820152602001613b16565b83811115611ea05750506000910152565b600181811c90821680613b5357607f821691505b60208210811415613b7457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613b8e57613b8e613b95565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610b5657600080fdfea2646970667358221220710745864c1defcb6ee8926acc64955dee9f16fb3a2cc5ae74b575afc892422c64736f6c63430008070033