ETH Price: $2,584.03 (-2.03%)

Contract

0x50dFEEAaab26C64F229C8c54C112243b865dD440
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Update Controlle...155127572022-09-11 4:12:16709 days ago1662869536IN
0x50dFEEAa...b865dD440
0 ETH0.000258855.523381
0x60c06040155127402022-09-11 4:08:17709 days ago1662869297IN
 Create: LXDAOBuidlerMetadata
0 ETH0.011251136.11168665

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LXDAOBuidlerMetadata

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 7 : LXDAOBuidlerMetadata.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

import "./ILXDAOBuidlerMetadata.sol";
import "./Base58.sol";

contract LXDAOBuidlerMetadata is Ownable, ILXDAOBuidlerMetadata, Base58 {
    using ECDSA for bytes32;

    string public baseURI = "ipfs://";
    bytes32 public tokenLxPointsURI;
    mapping(uint256 => bytes32) public tokenMetadataURIs;

    address private signer;
    // the controller of this metadata contract
    address private _controller;

    event SignerChanged();
    event ControllerChanged();
    event BaseURIChanged(address operator, string baseURI);
    event MetadataChanged(uint256 tokenId);
    event MultipleMetadataChanged(uint256[] tokenId);
    event LXPointsChanged();

    constructor(address _signer) {
        require(
            _signer != address(0),
            "LXDAOBuidlerMetadata: The signer cannot be initialized zero."
        );
        signer = _signer;
    }

    modifier onlyOwnerOrController() {
        require(
            _controller == _msgSender() || owner() == _msgSender(),
            "LXDAOBuidlerMetadata: caller is not the controller or contract owner."
        );
        _;
    }

    function setSigner(address _signer) external onlyOwner {
        signer = _signer;
        emit SignerChanged();
    }

    function getSigner() external view onlyOwner returns (address) {
        return signer;
    }

    function updateController(address controller) external onlyOwner {
        _controller = controller;
        emit ControllerChanged();
    }

    function getController() external view onlyOwner returns (address) {
        return _controller;
    }

    function updateBaseURI(string calldata _newBaseURI) external onlyOwner {
        baseURI = _newBaseURI;
        emit BaseURIChanged(msg.sender, _newBaseURI);
    }

    function _baseURI() internal view returns (string memory) {
        return baseURI;
    }

    function _hashBytes(bytes calldata ipfsHash)
        internal
        pure
        returns (bytes32)
    {
        return keccak256(abi.encode(ipfsHash));
    }

    function _verify(bytes32 hash, bytes memory token)
        internal
        view
        returns (bool)
    {
        return (_recover(hash, token) == signer);
    }

    function _recover(bytes32 hash, bytes memory token)
        internal
        pure
        returns (address)
    {
        return hash.toEthSignedMessageHash().recover(token);
    }

    function bytesTo32(bytes calldata source) private pure returns (bytes32) {
        return bytes32(source[:32]);
    }

    /**
     * @notice cidv0 is used to convert sha256 hash to cid(v0) used by IPFS.
     * @param sha256Hash_ sha256 hash generated by anything.
     * @return IPFS cid that meets the version0 specification.
     */
    function cidv0(bytes32 sha256Hash_) private pure returns (string memory) {
        bytes memory hashString = new bytes(34);
        hashString[0] = 0x12;
        hashString[1] = 0x20;
        uint256 hashLength = sha256Hash_.length;
        for (uint256 i = 0; i < hashLength; ++i) {
            hashString[i + 2] = sha256Hash_[i];
        }
        return Base58.encodeToString(hashString);
    }

    function create(uint256 tokenId, bytes calldata metadataURI)
        external
        onlyOwnerOrController
    {
        tokenMetadataURIs[tokenId] = bytesTo32(metadataURI);

        emit MetadataChanged(tokenId);
    }

    function update(uint256 tokenId, bytes calldata metadataURI)
        external
        onlyOwnerOrController
    {
        tokenMetadataURIs[tokenId] = bytesTo32(metadataURI);

        emit MetadataChanged(tokenId);
    }

    function batchUpdate(
        uint256[] calldata tokenIds,
        bytes[] calldata metadataURIs
    ) external onlyOwnerOrController {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            uint256 tokenId = tokenIds[i];
            tokenMetadataURIs[tokenId] = bytesTo32(metadataURIs[i]);
        }
        emit MultipleMetadataChanged(tokenIds);
    }

    function updateLXPointsURI(
        bytes calldata metadataURI,
        bytes calldata signature
    ) external onlyOwner {
        require(
            _verify(_hashBytes(metadataURI), signature),
            "LXDAOBuidlerMetadata: Invalid signature."
        );

        tokenLxPointsURI = bytesTo32(metadataURI);
        emit LXPointsChanged();
    }

    function tokenURI(uint256 tokenId) external view returns (string memory) {
        bytes32 hash = tokenMetadataURIs[tokenId];
        return string(abi.encodePacked(_baseURI(), cidv0(hash)));
    }

    function lxPointsURI() external view returns (string memory) {
        if (tokenLxPointsURI == bytes32(0)) {
            return "";
        }
        return string(abi.encodePacked(_baseURI(), cidv0(tokenLxPointsURI)));
    }
}

File 2 of 7 : ILXDAOBuidlerMetadata.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

interface ILXDAOBuidlerMetadata {
    function create(uint256 tokenId, bytes calldata metadataURI) external;

    function update(uint256 tokenId, bytes calldata metadataURI) external;

    function batchUpdate(
        uint256[] calldata tokenIds,
        bytes[] calldata metadataURIs
    ) external;

    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 3 of 7 : Base58.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

/**
 * Ported from https://github.com/storyicon/base58-solidity/blob/master/contracts/Base58.sol
 */
// use contract instead of library to avoid deployment
contract Base58 {
    bytes constant ALPHABET =
        "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";

    /**
     * @notice encode is used to encode the given bytes in base58 standard.
     * @param data_ raw data, passed in as bytes.
     * @return base58 encoded data_, returned as bytes.
     */
    function encode(bytes memory data_) public pure returns (bytes memory) {
        unchecked {
            uint256 size = data_.length;
            uint256 zeroCount;
            while (zeroCount < size && data_[zeroCount] == 0) {
                zeroCount++;
            }
            size = zeroCount + ((size - zeroCount) * 8351) / 6115 + 1;
            bytes memory slot = new bytes(size);
            uint32 carry;
            int256 m;
            int256 high = int256(size) - 1;
            for (uint256 i = 0; i < data_.length; i++) {
                m = int256(size - 1);
                for (carry = uint8(data_[i]); m > high || carry != 0; m--) {
                    carry = carry + 256 * uint8(slot[uint256(m)]);
                    slot[uint256(m)] = bytes1(uint8(carry % 58));
                    carry /= 58;
                }
                high = m;
            }
            uint256 n;
            for (n = zeroCount; n < size && slot[n] == 0; n++) {}
            size = slot.length - (n - zeroCount);
            bytes memory out = new bytes(size);
            for (uint256 i = 0; i < size; i++) {
                uint256 j = i + n - zeroCount;
                out[i] = ALPHABET[uint8(slot[j])];
            }
            return out;
        }
    }

    /**
     * @notice decode is used to decode the given string in base58 standard.
     * @param data_ data encoded with base58, passed in as bytes.
     * @return raw data, returned as bytes.
     */
    function decode(bytes memory data_) public pure returns (bytes memory) {
        unchecked {
            uint256 zero = 49;
            uint256 b58sz = data_.length;
            uint256 zcount = 0;
            for (uint256 i = 0; i < b58sz && uint8(data_[i]) == zero; i++) {
                zcount++;
            }
            uint256 t;
            uint256 c;
            bool f;
            bytes memory binu = new bytes(2 * (((b58sz * 8351) / 6115) + 1));
            uint32[] memory outi = new uint32[]((b58sz + 3) / 4);
            for (uint256 i = 0; i < data_.length; i++) {
                bytes1 r = data_[i];
                (c, f) = indexOf(ALPHABET, r);
                require(f, "invalid base58 digit");
                for (int256 k = int256(outi.length) - 1; k >= 0; k--) {
                    t = uint64(outi[uint256(k)]) * 58 + c;
                    c = t >> 32;
                    outi[uint256(k)] = uint32(t & 0xffffffff);
                }
            }
            uint64 mask = uint64(b58sz % 4) * 8;
            if (mask == 0) {
                mask = 32;
            }
            mask -= 8;
            uint256 outLen = 0;
            for (uint256 j = 0; j < outi.length; j++) {
                while (mask < 32) {
                    binu[outLen] = bytes1(uint8(outi[j] >> mask));
                    outLen++;
                    if (mask < 8) {
                        break;
                    }
                    mask -= 8;
                }
                mask = 24;
            }
            for (uint256 msb = zcount; msb < binu.length; msb++) {
                if (binu[msb] > 0) {
                    return slice(binu, msb - zcount, outLen);
                }
            }
            return slice(binu, 0, outLen);
        }
    }

    /**
     * @notice encodeToString is used to encode the given byte in base58 standard.
     * @param data_ raw data, passed in as bytes.
     * @return base58 encoded data_, returned as a string.
     */
    function encodeToString(bytes memory data_)
        public
        pure
        returns (string memory)
    {
        return string(encode(data_));
    }

    /**
     * @notice encodeFromString is used to encode the given string in base58 standard.
     * @param data_ raw data, passed in as a string.
     * @return base58 encoded data_, returned as bytes.
     */
    function encodeFromString(string memory data_)
        public
        pure
        returns (bytes memory)
    {
        return encode(bytes(data_));
    }

    /**
     * @notice decode is used to decode the given string in base58 standard.
     * @param data_ data encoded with base58, passed in as string.
     * @return raw data, returned as bytes.
     */
    function decodeFromString(string memory data_)
        public
        pure
        returns (bytes memory)
    {
        return decode(bytes(data_));
    }

    /**
     * @notice slice is used to slice the given byte, returns the bytes in the range of [start_, end_)
     * @param data_ raw data, passed in as bytes.
     * @param start_ start index.
     * @param end_ end index.
     * @return slice data
     */
    function slice(
        bytes memory data_,
        uint256 start_,
        uint256 end_
    ) public pure returns (bytes memory) {
        unchecked {
            bytes memory ret = new bytes(end_ - start_);
            for (uint256 i = 0; i < end_ - start_; i++) {
                ret[i] = data_[i + start_];
            }
            return ret;
        }
    }

    /**
     * @notice indexOf is used to find where char_ appears in data_.
     * @param data_ raw data, passed in as bytes.
     * @param char_ target byte.
     * @return index, and whether the search was successful.
     */
    function indexOf(bytes memory data_, bytes1 char_)
        public
        pure
        returns (uint256, bool)
    {
        unchecked {
            for (uint256 i = 0; i < data_.length; i++) {
                if (data_[i] == char_) {
                    return (i, true);
                }
            }
            return (0, false);
        }
    }
}

File 4 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.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 Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

File 5 of 7 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 6 of 7 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    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");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @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 (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // 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 Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

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

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

pragma solidity ^0.8.0;

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

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"ControllerChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"LXPointsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MetadataChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"tokenId","type":"uint256[]"}],"name":"MultipleMetadataChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"SignerChanged","type":"event"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes[]","name":"metadataURIs","type":"bytes[]"}],"name":"batchUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"metadataURI","type":"bytes"}],"name":"create","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"decode","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"data_","type":"string"}],"name":"decodeFromString","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"encode","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"data_","type":"string"}],"name":"encodeFromString","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"encodeToString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getController","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data_","type":"bytes"},{"internalType":"bytes1","name":"char_","type":"bytes1"}],"name":"indexOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"lxPointsURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data_","type":"bytes"},{"internalType":"uint256","name":"start_","type":"uint256"},{"internalType":"uint256","name":"end_","type":"uint256"}],"name":"slice","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"tokenLxPointsURI","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenMetadataURIs","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"metadataURI","type":"bytes"}],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"updateController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"metadataURI","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"updateLXPointsURI","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040526007608081905266697066733a2f2f60c81b60a09081526200002a91600191906200015d565b503480156200003857600080fd5b5060405162002172380380620021728339810160408190526200005b9162000203565b62000066336200010d565b6001600160a01b038116620000e75760405162461bcd60e51b815260206004820152603c60248201527f4c5844414f427569646c65724d657461646174613a20546865207369676e657260448201527f2063616e6e6f7420626520696e697469616c697a6564207a65726f2e00000000606482015260840160405180910390fd5b600480546001600160a01b0319166001600160a01b039290921691909117905562000272565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200016b9062000235565b90600052602060002090601f0160209004810192826200018f5760008555620001da565b82601f10620001aa57805160ff1916838001178555620001da565b82800160010185558215620001da579182015b82811115620001da578251825591602001919060010190620001bd565b50620001e8929150620001ec565b5090565b5b80821115620001e85760008155600101620001ed565b6000602082840312156200021657600080fd5b81516001600160a01b03811681146200022e57600080fd5b9392505050565b600181811c908216806200024a57607f821691505b602082108114156200026c57634e487b7160e01b600052602260045260246000fd5b50919050565b611ef080620002826000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c80637ac3c02f116100e3578063e00413961161008c578063e5c5e9a311610066578063e5c5e9a314610344578063f2fde38b14610357578063fd7230d61461019d57600080fd5b8063e004139614610315578063e02b1d7914610328578063e22f1ed11461033157600080fd5b8063931688cb116100bd578063931688cb146102dc578063c87b56dd146102ef578063c9e615911461030257600080fd5b80637ac3c02f1461029b5780638178ff43146102a35780638da5cb5b146102cb57600080fd5b806351c3463c116101455780636c19e7831161011f5780636c19e78314610278578063715018a61461028b57806377711f871461029357600080fd5b806351c3463c1461024f578063529d1bb7146102625780636c0360eb1461027057600080fd5b806312496a1b1161017657806312496a1b146101ee5780633018205f1461020157806344dcc2321461022157600080fd5b80630216b8381461019d578063046a466a146101b257806306cb5b66146101db575b600080fd5b6101b06101ab366004611817565b61036a565b005b6101c56101c03660046118ef565b610466565b6040516101d29190611994565b60405180910390f35b6101b06101e93660046119a7565b610477565b6101c56101fc3660046119f0565b6104d3565b610209610785565b6040516001600160a01b0390911681526020016101d2565b61024161022f366004611a25565b60036020526000908152604090205481565b6040519081526020016101d2565b6101c561025d3660046119f0565b61079f565b6101c561025d3660046118ef565b6101c56107aa565b6101b06102863660046119a7565b610838565b6101b0610893565b6101c56108a7565b6102096108fc565b6102b66102b1366004611a3e565b610916565b604080519283529015156020830152016101d2565b6000546001600160a01b0316610209565b6101b06102ea366004611a9d565b61097a565b6101c56102fd366004611a25565b6109ce565b6101b0610310366004611b24565b610a19565b6101c5610323366004611b90565b610b72565b61024160025481565b6101b061033f366004611bde565b610c24565b6101c56103523660046119f0565b610d23565b6101b06103653660046119a7565b611080565b6005546001600160a01b031633148061038d57506000546001600160a01b031633145b6104125760405162461bcd60e51b815260206004820152604560248201527f4c5844414f427569646c65724d657461646174613a2063616c6c65722069732060448201527f6e6f742074686520636f6e74726f6c6c6572206f7220636f6e7472616374206f6064820152643bb732b91760d91b608482015260a4015b60405180910390fd5b61041c8282611110565b60008481526003602090815260409182902092909255518481527fed8c59f3f58a8de9ce9ed7ceeb9a72b1d60a6c5201eeac3fe2122ca0a512df2b910160405180910390a1505050565b606061047182610d23565b92915050565b61047f61112f565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790556040517f61cb4f0c9f1798ab9001dbbfdaeef9f97d5261e1dc5034541b4c92529c4e433590600090a150565b805160609060005b818110801561050857508381815181106104f7576104f7611c3e565b01602001516001600160f81b031916155b15610515576001016104db565b6117e361209f82840302048101600101915060008267ffffffffffffffff81111561054257610542611863565b6040519080825280601f01601f19166020018201604052801561056c576020820181803683370190505b5090506000806000198501815b88518110156106525760018703925088818151811061059a5761059a611c3e565b016020015160f81c93505b818313806105b8575063ffffffff841615155b15610647578483815181106105cf576105cf611c3e565b602001015160f81c60f81b60f81c60ff166101000261ffff1684019350603a8463ffffffff168161060257610602611c54565b0660f81b85848151811061061857610618611c3e565b60200101906001600160f81b031916908160001a905350603a63ffffffff8516049350600019909201916105a5565b829150600101610579565b50845b8681108015610682575084818151811061067157610671611c3e565b01602001516001600160f81b031916155b1561068f57600101610655565b858103855103965060008767ffffffffffffffff8111156106b2576106b2611863565b6040519080825280601f01601f1916602001820160405280156106dc576020820181803683370190505b50905060005b88811015610777576000888483010390506040518060600160405280603a8152602001611e81603a913988828151811061071e5761071e611c3e565b0160200151815160f89190911c90811061073a5761073a611c3e565b602001015160f81c60f81b83838151811061075757610757611c3e565b60200101906001600160f81b031916908160001a905350506001016106e2565b509998505050505050505050565b600061078f61112f565b506005546001600160a01b031690565b6060610471826104d3565b600180546107b790611c6a565b80601f01602080910402602001604051908101604052809291908181526020018280546107e390611c6a565b80156108305780601f1061080557610100808354040283529160200191610830565b820191906000526020600020905b81548152906001019060200180831161081357829003601f168201915b505050505081565b61084061112f565b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790556040517e11e9e55e13c0f9f7ea956f4b1e8ba65ba63e88d7c306b9d90b9564cdd30c1190600090a150565b61089b61112f565b6108a56000611189565b565b6002546060906108c4575060408051602081019091526000815290565b6108cc6111e6565b6108d7600254611278565b6040516020016108e8929190611ca5565b604051602081830303815290604052905090565b600061090661112f565b506004546001600160a01b031690565b60008060005b845181101561096a57836001600160f81b03191685828151811061094257610942611c3e565b01602001516001600160f81b031916141561096257915060019050610973565b60010161091c565b50600080915091505b9250929050565b61098261112f565b61098e6001838361173c565b507f165934242147f3edfff841cdc7eaf9c061b07a451d00ad31e6ad1a4dc1c9402a3383836040516109c293929190611cfd565b60405180910390a15050565b6000818152600360205260409020546060906109e86111e6565b6109f182611278565b604051602001610a02929190611ca5565b604051602081830303815290604052915050919050565b6005546001600160a01b0316331480610a3c57506000546001600160a01b031633145b610abc5760405162461bcd60e51b815260206004820152604560248201527f4c5844414f427569646c65724d657461646174613a2063616c6c65722069732060448201527f6e6f742074686520636f6e74726f6c6c6572206f7220636f6e7472616374206f6064820152643bb732b91760d91b608482015260a401610409565b60005b83811015610b32576000858583818110610adb57610adb611c3e565b905060200201359050610b10848484818110610af957610af9611c3e565b9050602002810190610b0b9190611d29565b611110565b6000918252600360205260409091205580610b2a81611d86565b915050610abf565b507fab29e58be75bbd01f3bd9ec80dc147c41de8bf36627171c12801033276f209318484604051610b64929190611da1565b60405180910390a150505050565b6060600083830367ffffffffffffffff811115610b9157610b91611863565b6040519080825280601f01601f191660200182016040528015610bbb576020820181803683370190505b50905060005b848403811015610c1b578585820181518110610bdf57610bdf611c3e565b602001015160f81c60f81b828281518110610bfc57610bfc611c3e565b60200101906001600160f81b031916908160001a905350600101610bc1565b50949350505050565b610c2c61112f565b610c75610c398585611372565b83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113a592505050565b610ce75760405162461bcd60e51b815260206004820152602860248201527f4c5844414f427569646c65724d657461646174613a20496e76616c696420736960448201527f676e61747572652e0000000000000000000000000000000000000000000000006064820152608401610409565b610cf18484611110565b6002556040517fd00c70acbb9332366d30fe97da6ed4ae54aa46b47562def81f5b7c5c2ed463b190600090a150505050565b80516060906031906000805b8281108015610d56575083868281518110610d4c57610d4c611c3e565b016020015160f81c145b15610d675760019182019101610d2f565b5060008080806117e361209f87020460010160020267ffffffffffffffff811115610d9457610d94611863565b6040519080825280601f01601f191660200182016040528015610dbe576020820181803683370190505b50905060006004600388010467ffffffffffffffff811115610de257610de2611863565b604051908082528060200260200182016040528015610e0b578160200160208202803683370190505b50905060005b8a51811015610f375760008b8281518110610e2e57610e2e611c3e565b602001015160f81c60f81b9050610e5d6040518060600160405280603a8152602001611e81603a913982610916565b909650945084610eaf5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206261736535382064696769740000000000000000000000006044820152606401610409565b8251600019015b60008112610f2d5786848281518110610ed157610ed1611c3e565b602002602001015163ffffffff16603a0267ffffffffffffffff16019750602088901c96508763ffffffff16848281518110610f0f57610f0f611c3e565b63ffffffff9092166020928302919091019091015260001901610eb6565b5050600101610e11565b506008600388160267ffffffffffffffff8116610f52575060205b600719016000805b8351811015611005575b60208367ffffffffffffffff161015610ff9578267ffffffffffffffff16848281518110610f9457610f94611c3e565b602002602001015163ffffffff16901c60f81b858381518110610fb957610fb9611c3e565b60200101906001600160f81b031916908160001a905350600190910190600867ffffffffffffffff84161015610fee57610ff9565b600883039250610f64565b60189250600101610f5a565b50875b845181101561106357600060f81b85828151811061102857611028611c3e565b01602001516001600160f81b031916111561105b5761104a858a830384610b72565b9d9c50505050505050505050505050565b600101611008565b5061107084600083610b72565b9c9b505050505050505050505050565b61108861112f565b6001600160a01b0381166111045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610409565b61110d81611189565b50565b600061111f6020828486611df6565b61112891611e20565b9392505050565b6000546001600160a01b031633146108a55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610409565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060600180546111f590611c6a565b80601f016020809104026020016040519081016040528092919081815260200182805461122190611c6a565b801561126e5780601f106112435761010080835404028352916020019161126e565b820191906000526020600020905b81548152906001019060200180831161125157829003601f168201915b5050505050905090565b604080516022808252606082810190935260009190602082018180368337019050509050601260f81b816000815181106112b4576112b4611c3e565b60200101906001600160f81b031916908160001a905350602060f81b816001815181106112e3576112e3611c3e565b60200101906001600160f81b031916908160001a905350602060005b818110156113605784816020811061131957611319611c3e565b1a60f81b83611329836002611e3e565b8151811061133957611339611c3e565b60200101906001600160f81b031916908160001a90535061135981611d86565b90506112ff565b5061136a8261079f565b949350505050565b60008282604051602001611387929190611e56565b60405160208183030381529060405280519060200120905092915050565b6004546000906001600160a01b03166113be84846113cf565b6001600160a01b0316149392505050565b60006111288261142c856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90600080600061143c8585611451565b9150915061144981611494565b509392505050565b6000808251604114156114885760208301516040840151606085015160001a61147c8782858561164f565b94509450505050610973565b50600090506002610973565b60008160048111156114a8576114a8611e6a565b14156114b15750565b60018160048111156114c5576114c5611e6a565b14156115135760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610409565b600281600481111561152757611527611e6a565b14156115755760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610409565b600381600481111561158957611589611e6a565b14156115e25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610409565b60048160048111156115f6576115f6611e6a565b141561110d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610409565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156116865750600090506003611733565b8460ff16601b1415801561169e57508460ff16601c14155b156116af5750600090506004611733565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611703573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661172c57600060019250925050611733565b9150600090505b94509492505050565b82805461174890611c6a565b90600052602060002090601f01602090048101928261176a57600085556117b0565b82601f106117835782800160ff198235161785556117b0565b828001600101855582156117b0579182015b828111156117b0578235825591602001919060010190611795565b506117bc9291506117c0565b5090565b5b808211156117bc57600081556001016117c1565b60008083601f8401126117e757600080fd5b50813567ffffffffffffffff8111156117ff57600080fd5b60208301915083602082850101111561097357600080fd5b60008060006040848603121561182c57600080fd5b83359250602084013567ffffffffffffffff81111561184a57600080fd5b611856868287016117d5565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561189457611894611863565b604051601f8501601f19908116603f011681019082821181831017156118bc576118bc611863565b816040528093508581528686860111156118d557600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561190157600080fd5b813567ffffffffffffffff81111561191857600080fd5b8201601f8101841361192957600080fd5b61136a84823560208401611879565b60005b8381101561195357818101518382015260200161193b565b83811115611962576000848401525b50505050565b60008151808452611980816020860160208601611938565b601f01601f19169290920160200192915050565b6020815260006111286020830184611968565b6000602082840312156119b957600080fd5b81356001600160a01b038116811461112857600080fd5b600082601f8301126119e157600080fd5b61112883833560208501611879565b600060208284031215611a0257600080fd5b813567ffffffffffffffff811115611a1957600080fd5b61136a848285016119d0565b600060208284031215611a3757600080fd5b5035919050565b60008060408385031215611a5157600080fd5b823567ffffffffffffffff811115611a6857600080fd5b611a74858286016119d0565b92505060208301356001600160f81b031981168114611a9257600080fd5b809150509250929050565b60008060208385031215611ab057600080fd5b823567ffffffffffffffff811115611ac757600080fd5b611ad3858286016117d5565b90969095509350505050565b60008083601f840112611af157600080fd5b50813567ffffffffffffffff811115611b0957600080fd5b6020830191508360208260051b850101111561097357600080fd5b60008060008060408587031215611b3a57600080fd5b843567ffffffffffffffff80821115611b5257600080fd5b611b5e88838901611adf565b90965094506020870135915080821115611b7757600080fd5b50611b8487828801611adf565b95989497509550505050565b600080600060608486031215611ba557600080fd5b833567ffffffffffffffff811115611bbc57600080fd5b611bc8868287016119d0565b9660208601359650604090950135949350505050565b60008060008060408587031215611bf457600080fd5b843567ffffffffffffffff80821115611c0c57600080fd5b611c18888389016117d5565b90965094506020870135915080821115611c3157600080fd5b50611b84878288016117d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600181811c90821680611c7e57607f821691505b60208210811415611c9f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008351611cb7818460208801611938565b835190830190611ccb818360208801611938565b01949350505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0384168152604060208201526000611d20604083018486611cd4565b95945050505050565b6000808335601e19843603018112611d4057600080fd5b83018035915067ffffffffffffffff821115611d5b57600080fd5b60200191503681900382131561097357600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611d9a57611d9a611d70565b5060010190565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115611dda57600080fd5b8260051b80856040850137600092016040019182525092915050565b60008085851115611e0657600080fd5b83861115611e1357600080fd5b5050820193919092039150565b8035602083101561047157600019602084900360031b1b1692915050565b60008219821115611e5157611e51611d70565b500190565b60208152600061136a602083018486611cd4565b634e487b7160e01b600052602160045260246000fdfe31323334353637383941424344454647484a4b4c4d4e505152535455565758595a6162636465666768696a6b6d6e6f707172737475767778797aa26469706673582212205e5176a4e05bfe97202b807729017d9a0ffa1eebfe964a04d5b52b362353feec64736f6c634300080900330000000000000000000000003b909177382dd656def6efd0dff3c2556b6f6d94

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101985760003560e01c80637ac3c02f116100e3578063e00413961161008c578063e5c5e9a311610066578063e5c5e9a314610344578063f2fde38b14610357578063fd7230d61461019d57600080fd5b8063e004139614610315578063e02b1d7914610328578063e22f1ed11461033157600080fd5b8063931688cb116100bd578063931688cb146102dc578063c87b56dd146102ef578063c9e615911461030257600080fd5b80637ac3c02f1461029b5780638178ff43146102a35780638da5cb5b146102cb57600080fd5b806351c3463c116101455780636c19e7831161011f5780636c19e78314610278578063715018a61461028b57806377711f871461029357600080fd5b806351c3463c1461024f578063529d1bb7146102625780636c0360eb1461027057600080fd5b806312496a1b1161017657806312496a1b146101ee5780633018205f1461020157806344dcc2321461022157600080fd5b80630216b8381461019d578063046a466a146101b257806306cb5b66146101db575b600080fd5b6101b06101ab366004611817565b61036a565b005b6101c56101c03660046118ef565b610466565b6040516101d29190611994565b60405180910390f35b6101b06101e93660046119a7565b610477565b6101c56101fc3660046119f0565b6104d3565b610209610785565b6040516001600160a01b0390911681526020016101d2565b61024161022f366004611a25565b60036020526000908152604090205481565b6040519081526020016101d2565b6101c561025d3660046119f0565b61079f565b6101c561025d3660046118ef565b6101c56107aa565b6101b06102863660046119a7565b610838565b6101b0610893565b6101c56108a7565b6102096108fc565b6102b66102b1366004611a3e565b610916565b604080519283529015156020830152016101d2565b6000546001600160a01b0316610209565b6101b06102ea366004611a9d565b61097a565b6101c56102fd366004611a25565b6109ce565b6101b0610310366004611b24565b610a19565b6101c5610323366004611b90565b610b72565b61024160025481565b6101b061033f366004611bde565b610c24565b6101c56103523660046119f0565b610d23565b6101b06103653660046119a7565b611080565b6005546001600160a01b031633148061038d57506000546001600160a01b031633145b6104125760405162461bcd60e51b815260206004820152604560248201527f4c5844414f427569646c65724d657461646174613a2063616c6c65722069732060448201527f6e6f742074686520636f6e74726f6c6c6572206f7220636f6e7472616374206f6064820152643bb732b91760d91b608482015260a4015b60405180910390fd5b61041c8282611110565b60008481526003602090815260409182902092909255518481527fed8c59f3f58a8de9ce9ed7ceeb9a72b1d60a6c5201eeac3fe2122ca0a512df2b910160405180910390a1505050565b606061047182610d23565b92915050565b61047f61112f565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790556040517f61cb4f0c9f1798ab9001dbbfdaeef9f97d5261e1dc5034541b4c92529c4e433590600090a150565b805160609060005b818110801561050857508381815181106104f7576104f7611c3e565b01602001516001600160f81b031916155b15610515576001016104db565b6117e361209f82840302048101600101915060008267ffffffffffffffff81111561054257610542611863565b6040519080825280601f01601f19166020018201604052801561056c576020820181803683370190505b5090506000806000198501815b88518110156106525760018703925088818151811061059a5761059a611c3e565b016020015160f81c93505b818313806105b8575063ffffffff841615155b15610647578483815181106105cf576105cf611c3e565b602001015160f81c60f81b60f81c60ff166101000261ffff1684019350603a8463ffffffff168161060257610602611c54565b0660f81b85848151811061061857610618611c3e565b60200101906001600160f81b031916908160001a905350603a63ffffffff8516049350600019909201916105a5565b829150600101610579565b50845b8681108015610682575084818151811061067157610671611c3e565b01602001516001600160f81b031916155b1561068f57600101610655565b858103855103965060008767ffffffffffffffff8111156106b2576106b2611863565b6040519080825280601f01601f1916602001820160405280156106dc576020820181803683370190505b50905060005b88811015610777576000888483010390506040518060600160405280603a8152602001611e81603a913988828151811061071e5761071e611c3e565b0160200151815160f89190911c90811061073a5761073a611c3e565b602001015160f81c60f81b83838151811061075757610757611c3e565b60200101906001600160f81b031916908160001a905350506001016106e2565b509998505050505050505050565b600061078f61112f565b506005546001600160a01b031690565b6060610471826104d3565b600180546107b790611c6a565b80601f01602080910402602001604051908101604052809291908181526020018280546107e390611c6a565b80156108305780601f1061080557610100808354040283529160200191610830565b820191906000526020600020905b81548152906001019060200180831161081357829003601f168201915b505050505081565b61084061112f565b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790556040517e11e9e55e13c0f9f7ea956f4b1e8ba65ba63e88d7c306b9d90b9564cdd30c1190600090a150565b61089b61112f565b6108a56000611189565b565b6002546060906108c4575060408051602081019091526000815290565b6108cc6111e6565b6108d7600254611278565b6040516020016108e8929190611ca5565b604051602081830303815290604052905090565b600061090661112f565b506004546001600160a01b031690565b60008060005b845181101561096a57836001600160f81b03191685828151811061094257610942611c3e565b01602001516001600160f81b031916141561096257915060019050610973565b60010161091c565b50600080915091505b9250929050565b61098261112f565b61098e6001838361173c565b507f165934242147f3edfff841cdc7eaf9c061b07a451d00ad31e6ad1a4dc1c9402a3383836040516109c293929190611cfd565b60405180910390a15050565b6000818152600360205260409020546060906109e86111e6565b6109f182611278565b604051602001610a02929190611ca5565b604051602081830303815290604052915050919050565b6005546001600160a01b0316331480610a3c57506000546001600160a01b031633145b610abc5760405162461bcd60e51b815260206004820152604560248201527f4c5844414f427569646c65724d657461646174613a2063616c6c65722069732060448201527f6e6f742074686520636f6e74726f6c6c6572206f7220636f6e7472616374206f6064820152643bb732b91760d91b608482015260a401610409565b60005b83811015610b32576000858583818110610adb57610adb611c3e565b905060200201359050610b10848484818110610af957610af9611c3e565b9050602002810190610b0b9190611d29565b611110565b6000918252600360205260409091205580610b2a81611d86565b915050610abf565b507fab29e58be75bbd01f3bd9ec80dc147c41de8bf36627171c12801033276f209318484604051610b64929190611da1565b60405180910390a150505050565b6060600083830367ffffffffffffffff811115610b9157610b91611863565b6040519080825280601f01601f191660200182016040528015610bbb576020820181803683370190505b50905060005b848403811015610c1b578585820181518110610bdf57610bdf611c3e565b602001015160f81c60f81b828281518110610bfc57610bfc611c3e565b60200101906001600160f81b031916908160001a905350600101610bc1565b50949350505050565b610c2c61112f565b610c75610c398585611372565b83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113a592505050565b610ce75760405162461bcd60e51b815260206004820152602860248201527f4c5844414f427569646c65724d657461646174613a20496e76616c696420736960448201527f676e61747572652e0000000000000000000000000000000000000000000000006064820152608401610409565b610cf18484611110565b6002556040517fd00c70acbb9332366d30fe97da6ed4ae54aa46b47562def81f5b7c5c2ed463b190600090a150505050565b80516060906031906000805b8281108015610d56575083868281518110610d4c57610d4c611c3e565b016020015160f81c145b15610d675760019182019101610d2f565b5060008080806117e361209f87020460010160020267ffffffffffffffff811115610d9457610d94611863565b6040519080825280601f01601f191660200182016040528015610dbe576020820181803683370190505b50905060006004600388010467ffffffffffffffff811115610de257610de2611863565b604051908082528060200260200182016040528015610e0b578160200160208202803683370190505b50905060005b8a51811015610f375760008b8281518110610e2e57610e2e611c3e565b602001015160f81c60f81b9050610e5d6040518060600160405280603a8152602001611e81603a913982610916565b909650945084610eaf5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206261736535382064696769740000000000000000000000006044820152606401610409565b8251600019015b60008112610f2d5786848281518110610ed157610ed1611c3e565b602002602001015163ffffffff16603a0267ffffffffffffffff16019750602088901c96508763ffffffff16848281518110610f0f57610f0f611c3e565b63ffffffff9092166020928302919091019091015260001901610eb6565b5050600101610e11565b506008600388160267ffffffffffffffff8116610f52575060205b600719016000805b8351811015611005575b60208367ffffffffffffffff161015610ff9578267ffffffffffffffff16848281518110610f9457610f94611c3e565b602002602001015163ffffffff16901c60f81b858381518110610fb957610fb9611c3e565b60200101906001600160f81b031916908160001a905350600190910190600867ffffffffffffffff84161015610fee57610ff9565b600883039250610f64565b60189250600101610f5a565b50875b845181101561106357600060f81b85828151811061102857611028611c3e565b01602001516001600160f81b031916111561105b5761104a858a830384610b72565b9d9c50505050505050505050505050565b600101611008565b5061107084600083610b72565b9c9b505050505050505050505050565b61108861112f565b6001600160a01b0381166111045760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610409565b61110d81611189565b50565b600061111f6020828486611df6565b61112891611e20565b9392505050565b6000546001600160a01b031633146108a55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610409565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060600180546111f590611c6a565b80601f016020809104026020016040519081016040528092919081815260200182805461122190611c6a565b801561126e5780601f106112435761010080835404028352916020019161126e565b820191906000526020600020905b81548152906001019060200180831161125157829003601f168201915b5050505050905090565b604080516022808252606082810190935260009190602082018180368337019050509050601260f81b816000815181106112b4576112b4611c3e565b60200101906001600160f81b031916908160001a905350602060f81b816001815181106112e3576112e3611c3e565b60200101906001600160f81b031916908160001a905350602060005b818110156113605784816020811061131957611319611c3e565b1a60f81b83611329836002611e3e565b8151811061133957611339611c3e565b60200101906001600160f81b031916908160001a90535061135981611d86565b90506112ff565b5061136a8261079f565b949350505050565b60008282604051602001611387929190611e56565b60405160208183030381529060405280519060200120905092915050565b6004546000906001600160a01b03166113be84846113cf565b6001600160a01b0316149392505050565b60006111288261142c856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90600080600061143c8585611451565b9150915061144981611494565b509392505050565b6000808251604114156114885760208301516040840151606085015160001a61147c8782858561164f565b94509450505050610973565b50600090506002610973565b60008160048111156114a8576114a8611e6a565b14156114b15750565b60018160048111156114c5576114c5611e6a565b14156115135760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610409565b600281600481111561152757611527611e6a565b14156115755760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610409565b600381600481111561158957611589611e6a565b14156115e25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610409565b60048160048111156115f6576115f6611e6a565b141561110d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610409565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156116865750600090506003611733565b8460ff16601b1415801561169e57508460ff16601c14155b156116af5750600090506004611733565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611703573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661172c57600060019250925050611733565b9150600090505b94509492505050565b82805461174890611c6a565b90600052602060002090601f01602090048101928261176a57600085556117b0565b82601f106117835782800160ff198235161785556117b0565b828001600101855582156117b0579182015b828111156117b0578235825591602001919060010190611795565b506117bc9291506117c0565b5090565b5b808211156117bc57600081556001016117c1565b60008083601f8401126117e757600080fd5b50813567ffffffffffffffff8111156117ff57600080fd5b60208301915083602082850101111561097357600080fd5b60008060006040848603121561182c57600080fd5b83359250602084013567ffffffffffffffff81111561184a57600080fd5b611856868287016117d5565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561189457611894611863565b604051601f8501601f19908116603f011681019082821181831017156118bc576118bc611863565b816040528093508581528686860111156118d557600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561190157600080fd5b813567ffffffffffffffff81111561191857600080fd5b8201601f8101841361192957600080fd5b61136a84823560208401611879565b60005b8381101561195357818101518382015260200161193b565b83811115611962576000848401525b50505050565b60008151808452611980816020860160208601611938565b601f01601f19169290920160200192915050565b6020815260006111286020830184611968565b6000602082840312156119b957600080fd5b81356001600160a01b038116811461112857600080fd5b600082601f8301126119e157600080fd5b61112883833560208501611879565b600060208284031215611a0257600080fd5b813567ffffffffffffffff811115611a1957600080fd5b61136a848285016119d0565b600060208284031215611a3757600080fd5b5035919050565b60008060408385031215611a5157600080fd5b823567ffffffffffffffff811115611a6857600080fd5b611a74858286016119d0565b92505060208301356001600160f81b031981168114611a9257600080fd5b809150509250929050565b60008060208385031215611ab057600080fd5b823567ffffffffffffffff811115611ac757600080fd5b611ad3858286016117d5565b90969095509350505050565b60008083601f840112611af157600080fd5b50813567ffffffffffffffff811115611b0957600080fd5b6020830191508360208260051b850101111561097357600080fd5b60008060008060408587031215611b3a57600080fd5b843567ffffffffffffffff80821115611b5257600080fd5b611b5e88838901611adf565b90965094506020870135915080821115611b7757600080fd5b50611b8487828801611adf565b95989497509550505050565b600080600060608486031215611ba557600080fd5b833567ffffffffffffffff811115611bbc57600080fd5b611bc8868287016119d0565b9660208601359650604090950135949350505050565b60008060008060408587031215611bf457600080fd5b843567ffffffffffffffff80821115611c0c57600080fd5b611c18888389016117d5565b90965094506020870135915080821115611c3157600080fd5b50611b84878288016117d5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600181811c90821680611c7e57607f821691505b60208210811415611c9f57634e487b7160e01b600052602260045260246000fd5b50919050565b60008351611cb7818460208801611938565b835190830190611ccb818360208801611938565b01949350505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0384168152604060208201526000611d20604083018486611cd4565b95945050505050565b6000808335601e19843603018112611d4057600080fd5b83018035915067ffffffffffffffff821115611d5b57600080fd5b60200191503681900382131561097357600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611d9a57611d9a611d70565b5060010190565b6020815281602082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115611dda57600080fd5b8260051b80856040850137600092016040019182525092915050565b60008085851115611e0657600080fd5b83861115611e1357600080fd5b5050820193919092039150565b8035602083101561047157600019602084900360031b1b1692915050565b60008219821115611e5157611e51611d70565b500190565b60208152600061136a602083018486611cd4565b634e487b7160e01b600052602160045260246000fdfe31323334353637383941424344454647484a4b4c4d4e505152535455565758595a6162636465666768696a6b6d6e6f707172737475767778797aa26469706673582212205e5176a4e05bfe97202b807729017d9a0ffa1eebfe964a04d5b52b362353feec64736f6c63430008090033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000003b909177382dd656def6efd0dff3c2556b6f6d94

-----Decoded View---------------
Arg [0] : _signer (address): 0x3B909177382DD656Def6efd0DFf3C2556b6f6d94

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003b909177382dd656def6efd0dff3c2556b6f6d94


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.