Merklechain Explorer

Contract Address : 0xCE5161293b416abEbDa86956c6Ce20c75a1B942e
Overview
Balance
0 Merkle
Tokens
Fetching tokens...
More Info
Token
Bigtycoon (mBTYC)
Creator
0xfabaa9–540ee2 at 0xa1fb82–a654c9
Contract name:
BigTycoon




Optimization enabled
true
Compiler version
v0.8.10+commit.fc410830




Optimization runs
200
EVM Version
default




Verified at
2023-12-13T12:17:17.796952Z

Contract source code

// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0;

library Counters {
    struct Counter {

        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

}

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);   
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom( address sender, address recipient,uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner,address indexed spender,uint256 value);
}

interface IERC20Mintable is IERC20 {
    function mint(address _to, uint256 amount) external returns (bool);
    function burn(uint256 amount) external ;
    event Mint(address indexed minter, address indexed to, uint256 amount);
    event Burn(address indexed burner, uint256 amount);
}

library Address {
 
    function isContract(address account) internal view returns (bool) {
        bytes32 codehash;
        bytes32 accountHash= 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }


    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount,"Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success,"Address: unable to send value, recipient may have reverted");
    }

 
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }


    function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

 
    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");
    }


    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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue( address target, bytes memory data, uint256 weiValue,string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(data);
        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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

abstract contract Initializable {

    uint8 private _initialized;
    bool private _initializing;

    event Initialized(uint8 version);

    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

}

contract Ownable is Context {
    address private _owner;
    event OwnershipTransferred(address previousOwner, address newOwner);


    function owner() external view returns (address) {
    return _owner;
    }

    function setOwner(address newOwner) internal {
        _owner = newOwner;
    }

    modifier onlyOwner() {
        require(_msgSender() == _owner, "Ownable: caller is not the owner");
        _;
    }

    function transferOwnership(address newOwner) external onlyOwner {
        require(newOwner != address(0),"Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        setOwner(newOwner);
    }
}

contract Pausable is Ownable {
    event Pause();
    event Unpause();

    bool public paused = false;

    modifier whenNotPaused() {
    require(!paused, "Pausable: paused");
    _;
    }


    function pause() external onlyOwner {
        paused = true;
        emit Pause();
    }

 
    function unpause() external onlyOwner {
        paused = false;
        emit Unpause();
    }


}

interface IERC20Metadata is IERC20Mintable {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
}

library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;


    function toString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }



}

library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }


    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

interface IERC20Permit is IERC20Metadata{
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;


    function nonces(address owner) external view returns (uint256);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

abstract contract EIP712 {
   
    bytes32 private  _CACHED_DOMAIN_SEPARATOR;
    uint256 private  _CACHED_CHAIN_ID;
    address private  _CACHED_THIS;
    bytes32 private  _HASHED_NAME;
    bytes32 private  _HASHED_VERSION;
    bytes32 private  _TYPE_HASH;


    function eip712(string memory name, string memory version) internal virtual {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }


    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

   
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

interface IAntisnipe {
    function assureCanTransfer(
        address sender,
        address from,
        address to,
        uint256 amount
    ) external;
}

contract BigTycoon is  Ownable, Pausable, Initializable, IERC20Permit, EIP712  {
    using Counters for Counters.Counter;

    string public override name;
    string public override symbol;
    uint8 public override decimals;
    IAntisnipe public antisnipe;
    bool public antisnipeDisable;

    mapping(address => uint256) internal _balances;
    mapping(address => mapping(address => uint256)) internal allowed;
    uint256 internal _totalSupply;
    mapping(address => Counters.Counter) private _nonces;

    bytes32 private constant _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    function initialize( string memory tokenName, string memory tokenSymbol, uint8 tokenDecimals, address newOwner) external  initializer {
        require(newOwner != address(0),"ERC20: new owner is the zero address");

        name = tokenName;
        symbol = tokenSymbol;
        decimals = tokenDecimals;
        setOwner(newOwner);
        eip712(tokenName,"1");
     
    }


    function mint(address to, uint256 amount) external override whenNotPaused onlyOwner returns (bool) {
        require(to != address(0), 'ERC20: mint to the zero address');

        _beforeTokenTransfer(address(0), to, amount);

        _totalSupply += amount;
        _balances[to] += amount;
        emit Transfer(address(0), to, amount);
        return true;
    }


    function allowance(address _owner, address spender) external override view returns (uint256) {
        return allowed[_owner][spender];
    }

    function totalSupply() external override view returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) external override view returns (uint256) {
        return _balances[account];
    }
 
    function approve(address spender, uint256 value) external override whenNotPaused returns (bool) {
        _approve(_msgSender(), spender, value);
        return true;
    }

    function _approve(address _owner, address spender,uint256 value) internal  {
        require(_owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");
        allowed[_owner][spender] = value;
        emit Approval(_owner, spender, value);
    }

    function transferFrom(address from, address to, uint256 value) external override whenNotPaused  returns (bool) {
        require(value <= allowed[from][_msgSender()], "ERC20: transfer amount exceeds allowance");
        _transfer(from, to, value);
        allowed[from][_msgSender()] -= value;
        return true;
    }

    function transfer(address to, uint256 value) external override whenNotPaused  returns (bool) {
        _transfer(_msgSender(), to, value);
        return true;
    }

    function _transfer( address from, address to, uint256 value) internal  {
         require(from != address(0), 'ERC20: transfer from the zero address');
        require(to != address(0), 'ERC20: transfer to the zero address');

        _beforeTokenTransfer(from, to, value);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= value, 'ERC20: transfer amount exceeds balance');
        unchecked {
            _balances[from] = fromBalance - value;
        }
        _balances[to] += value;

        emit Transfer(from, to, value);
    }


    function burn(uint256 amount) external override {
        uint256 balance = _balances[_msgSender()];
        require(amount > 0, "ERC20: burn amount not greater than 0");
        require(balance >= amount, "ERC20: burn amount exceeds balance");
         _beforeTokenTransfer(_msgSender(), address(0), amount);
        _totalSupply  -= amount;
        _balances[_msgSender()] -= amount;
        emit Burn(_msgSender(), amount);
        emit Transfer(_msgSender(), address(0), amount);
    }

    function increaseAllowance(address spender, uint256 increment) external whenNotPaused  returns (bool) {
        _increaseAllowance(_msgSender(), spender, increment);
        return true;
    }

    function decreaseAllowance(address spender, uint256 decrement) external whenNotPaused  returns (bool) {
        _decreaseAllowance(_msgSender(), spender, decrement);
        return true;
    }

    function _increaseAllowance( address _owner, address spender, uint256 increment) internal  {
        _approve(_owner, spender, allowed[_owner][spender]+increment);
    }

    function _decreaseAllowance(address _owner, address spender, uint256 decrement) internal  {
         _approve(_owner,spender, allowed[_owner][spender]-decrement);
    }

    function permit(
        address _owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public whenNotPaused virtual override {
        require(block.timestamp <= deadline, "ERC20Permit: expired deadline");

        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, _owner, spender, value, _useNonce(_owner), deadline));

        bytes32 hash = _hashTypedDataV4(structHash);

        address signer = ECDSA.recover(hash, v, r, s);
        require(signer == _owner, "ERC20Permit: invalid signature");

        _approve(_owner, spender, value);
    }

    function nonces(address _owner) public view virtual override returns (uint256) {
        return _nonces[_owner].current();
    }

    function DOMAIN_SEPARATOR() external view override returns (bytes32) {
        return _domainSeparatorV4();
    }

    function _useNonce(address _owner) internal virtual returns (uint256 current) {
        Counters.Counter storage nonce = _nonces[_owner];
        current = nonce.current();
        nonce.increment();
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal  whenNotPaused {
        if (from == address(0) || to == address(0)) return;
        if (!antisnipeDisable && address(antisnipe) != address(0))
            antisnipe.assureCanTransfer(_msgSender(), from, to, amount);
    }

    function setAntisnipeDisable() external onlyOwner {
        require(!antisnipeDisable);
        antisnipeDisable = true;
    }

    function setAntisnipeAddress(address addr) external onlyOwner {
        antisnipe = IAntisnipe(addr);
    }

} 
              
        

Contract ABI

[{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"type":"address","name":"burner","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"type":"uint8","name":"version","internalType":"uint8","indexed":false}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"type":"address","name":"minter","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":false},{"type":"address","name":"newOwner","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Pause","inputs":[],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Unpause","inputs":[],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DOMAIN_SEPARATOR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"_owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IAntisnipe"}],"name":"antisnipe","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"antisnipeDisable","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"decrement","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"increment","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"string","name":"tokenName","internalType":"string"},{"type":"string","name":"tokenSymbol","internalType":"string"},{"type":"uint8","name":"tokenDecimals","internalType":"uint8"},{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"mint","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nonces","inputs":[{"type":"address","name":"_owner","internalType":"address"}]},{"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":"permit","inputs":[{"type":"address","name":"_owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAntisnipeAddress","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAntisnipeDisable","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]}]
            

Deployed ByteCode

0x608060405234801561001057600080fd5b506004361061018e5760003560e01c806374fb20e1116100de578063a457c2d711610097578063dd62ed3e11610071578063dd62ed3e14610358578063de7ea79d14610391578063e1e144de146103a4578063f2fde38b146103b857600080fd5b8063a457c2d71461031f578063a9059cbb14610332578063d505accf1461034557600080fd5b806374fb20e1146102b35780637ecebe00146102bb5780638456cb59146102ce578063882cfb3f146102d65780638da5cb5b1461030657806395d89b411461031757600080fd5b8063395093511161014b57806342966c681161012557806342966c68146102505780635c975abb14610263578063611bf6291461027757806370a082311461028a57600080fd5b806339509351146102205780633f4ba83a1461023357806340c10f191461023d57600080fd5b806306fdde0314610193578063095ea7b3146101b157806318160ddd146101d457806323b872dd146101e6578063313ce567146101f95780633644e51514610218575b600080fd5b61019b6103cb565b6040516101a89190611862565b60405180910390f35b6101c46101bf3660046118d3565b610459565b60405190151581526020016101a8565b600c545b6040519081526020016101a8565b6101c46101f43660046118fd565b6104a1565b6009546102069060ff1681565b60405160ff90911681526020016101a8565b6101d861059d565b6101c461022e3660046118d3565b6105ac565b61023b6105e2565b005b6101c461024b3660046118d3565b61064b565b61023b61025e366004611939565b610799565b6000546101c490600160a01b900460ff1681565b61023b610285366004611952565b610917565b6101d8610298366004611952565b6001600160a01b03166000908152600a602052604090205490565b61023b610972565b6101d86102c9366004611952565b6109d1565b61023b6109f1565b6009546102ee9061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b6000546001600160a01b03166102ee565b61019b610a60565b6101c461032d3660046118d3565b610a6d565b6101c46103403660046118d3565b610aa3565b61023b610353366004611985565b610ad9565b6101d86103663660046119ef565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b61023b61039f366004611ac5565b610c67565b6009546101c490600160a81b900460ff1681565b61023b6103c6366004611952565b610e5b565b600780546103d890611b4a565b80601f016020809104026020016040519081016040528092919081815260200182805461040490611b4a565b80156104515780601f1061042657610100808354040283529160200191610451565b820191906000526020600020905b81548152906001019060200180831161043457829003601f168201915b505050505081565b60008054600160a01b900460ff161561048d5760405162461bcd60e51b815260040161048490611b7f565b60405180910390fd5b610498338484610f46565b50600192915050565b60008054600160a01b900460ff16156104cc5760405162461bcd60e51b815260040161048490611b7f565b6001600160a01b0384166000908152600b602090815260408083203384529091529020548211156105505760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610484565b61055b84848461106a565b6001600160a01b0384166000908152600b602090815260408083203384529091528120805484929061058e908490611bbf565b90915550600195945050505050565b60006105a7611244565b905090565b60008054600160a01b900460ff16156105d75760405162461bcd60e51b815260040161048490611b7f565b61049833848461127f565b6000546001600160a01b0316336001600160a01b0316146106155760405162461bcd60e51b815260040161048490611bd6565b6000805460ff60a01b191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60008054600160a01b900460ff16156106765760405162461bcd60e51b815260040161048490611b7f565b6000546001600160a01b0316336001600160a01b0316146106a95760405162461bcd60e51b815260040161048490611bd6565b6001600160a01b0383166106ff5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610484565b61070b600084846112c2565b81600c600082825461071d9190611c0b565b90915550506001600160a01b0383166000908152600a60205260408120805484929061074a908490611c0b565b90915550506040518281526001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a350600192915050565b336000908152600a6020526040902054816108045760405162461bcd60e51b815260206004820152602560248201527f45524332303a206275726e20616d6f756e74206e6f7420677265617465722074604482015264068616e20360dc1b6064820152608401610484565b8181101561085f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610484565b61086b336000846112c2565b81600c600082825461087d9190611bbf565b9091555050336000908152600a6020526040812080548492906108a1908490611bbf565b909155505060405182815233907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a260405182815260009033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6000546001600160a01b0316336001600160a01b03161461094a5760405162461bcd60e51b815260040161048490611bd6565b600980546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6000546001600160a01b0316336001600160a01b0316146109a55760405162461bcd60e51b815260040161048490611bd6565b600954600160a81b900460ff16156109bc57600080fd5b6009805460ff60a81b1916600160a81b179055565b6001600160a01b0381166000908152600d60205260408120545b92915050565b6000546001600160a01b0316336001600160a01b031614610a245760405162461bcd60e51b815260040161048490611bd6565b6000805460ff60a01b1916600160a01b1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600880546103d890611b4a565b60008054600160a01b900460ff1615610a985760405162461bcd60e51b815260040161048490611b7f565b6104983384846113cd565b60008054600160a01b900460ff1615610ace5760405162461bcd60e51b815260040161048490611b7f565b61049833848461106a565b600054600160a01b900460ff1615610b035760405162461bcd60e51b815260040161048490611b7f565b83421115610b535760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610484565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610b828c611406565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610bdd8261142e565b90506000610bed8287878761147c565b9050896001600160a01b0316816001600160a01b031614610c505760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610484565b610c5b8a8a8a610f46565b50505050505050505050565b600054600160b01b900460ff1615808015610c8f57506000546001600160a81b90910460ff16105b80610cb75750610c9e306114a4565b158015610cb75750600054600160a81b900460ff166001145b610d1a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610484565b6000805460ff60a81b1916600160a81b1790558015610d47576000805460ff60b01b1916600160b01b1790555b6001600160a01b038216610da95760405162461bcd60e51b8152602060048201526024808201527f45524332303a206e6577206f776e657220697320746865207a65726f206164646044820152637265737360e01b6064820152608401610484565b8451610dbc9060079060208801906117c9565b508351610dd09060089060208701906117c9565b506009805460ff191660ff8516179055610de9826114e0565b610e0c85604051806040016040528060018152602001603160f81b815250611502565b8015610e54576000805460ff60b01b19169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6000546001600160a01b0316336001600160a01b031614610e8e5760405162461bcd60e51b815260040161048490611bd6565b6001600160a01b038116610ef35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610484565b600054604080516001600160a01b03928316815291831660208301527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0910160405180910390a1610f43816114e0565b50565b6001600160a01b038316610fa85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610484565b6001600160a01b0382166110095760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610484565b6001600160a01b038381166000818152600b602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110ce5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610484565b6001600160a01b0382166111305760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610484565b61113b8383836112c2565b6001600160a01b0383166000908152600a6020526040902054818110156111b35760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610484565b6001600160a01b038085166000908152600a60205260408082208585039055918516815290812080548492906111ea908490611c0b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161123691815260200190565b60405180910390a350505050565b6003546000906001600160a01b031630148015611262575060025446145b1561126e575060015490565b6105a760065460045460055461156e565b6001600160a01b038084166000908152600b60209081526040808320938616835292905220546112bd90849084906112b8908590611c0b565b610f46565b505050565b600054600160a01b900460ff16156112ec5760405162461bcd60e51b815260040161048490611b7f565b6001600160a01b038316158061130957506001600160a01b038216155b1561131357505050565b600954600160a81b900460ff1615801561133c575060095461010090046001600160a01b031615155b156112bd5760095461010090046001600160a01b0316635d37a8dd336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201528187166024820152908516604482015260648101849052608401600060405180830381600087803b1580156113b057600080fd5b505af11580156113c4573d6000803e3d6000fd5b50505050505050565b6001600160a01b038084166000908152600b60209081526040808320938616835292905220546112bd90849084906112b8908590611bbf565b6001600160a01b0381166000908152600d602052604090208054600181018255905b50919050565b60006109eb61143b611244565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061148d878787876115b7565b9150915061149a8161167b565b5095945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906114d857508115155b949350505050565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b815160208084019190912082519183019190912060048290556005819055466002557f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f61155081848461156e565b600155600380546001600160a01b0319163017905560065550505050565b6040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156115ee5750600090506003611672565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611642573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661166b57600060019250925050611672565b9150600090505b94509492505050565b600081600481111561168f5761168f611c23565b14156116985750565b60018160048111156116ac576116ac611c23565b14156116fa5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610484565b600281600481111561170e5761170e611c23565b141561175c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610484565b600381600481111561177057611770611c23565b1415610f435760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610484565b8280546117d590611b4a565b90600052602060002090601f0160209004810192826117f7576000855561183d565b82601f1061181057805160ff191683800117855561183d565b8280016001018555821561183d579182015b8281111561183d578251825591602001919060010190611822565b5061184992915061184d565b5090565b5b80821115611849576000815560010161184e565b600060208083528351808285015260005b8181101561188f57858101830151858201604001528201611873565b818111156118a1576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146118ce57600080fd5b919050565b600080604083850312156118e657600080fd5b6118ef836118b7565b946020939093013593505050565b60008060006060848603121561191257600080fd5b61191b846118b7565b9250611929602085016118b7565b9150604084013590509250925092565b60006020828403121561194b57600080fd5b5035919050565b60006020828403121561196457600080fd5b61196d826118b7565b9392505050565b803560ff811681146118ce57600080fd5b600080600080600080600060e0888a0312156119a057600080fd5b6119a9886118b7565b96506119b7602089016118b7565b955060408801359450606088013593506119d360808901611974565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215611a0257600080fd5b611a0b836118b7565b9150611a19602084016118b7565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112611a4957600080fd5b813567ffffffffffffffff80821115611a6457611a64611a22565b604051601f8301601f19908116603f01168101908282118183101715611a8c57611a8c611a22565b81604052838152866020858801011115611aa557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060808587031215611adb57600080fd5b843567ffffffffffffffff80821115611af357600080fd5b611aff88838901611a38565b95506020870135915080821115611b1557600080fd5b50611b2287828801611a38565b935050611b3160408601611974565b9150611b3f606086016118b7565b905092959194509250565b600181811c90821680611b5e57607f821691505b6020821081141561142857634e487b7160e01b600052602260045260246000fd5b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015611bd157611bd1611ba9565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611c1e57611c1e611ba9565b500190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220af7b9b2b0babc800e38400f16b798234bde27713540c01c70239980e29eb9a5a64736f6c634300080a0033