ETH Price: $3,123.29 (+0.96%)

Contract

0x3803856585A7fbC6A3bCa94A0b9C49a48af90DD3
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60806040729789392023-02-08 16:30:12465 days ago1675873812IN
 Create: CliqueOPIssuerV2
0 ETH0.000001120.001

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
1075253942023-07-29 16:52:45294 days ago1690649565
0x38038565...48af90DD3
0.0002 ETH
1074769742023-07-28 13:58:45295 days ago1690552725
0x38038565...48af90DD3
0.0004 ETH
1073693952023-07-26 2:12:47297 days ago1690337567
0x38038565...48af90DD3
0.0012 ETH
1073692442023-07-26 2:07:45297 days ago1690337265
0x38038565...48af90DD3
0.0012 ETH
1073580132023-07-25 19:53:23298 days ago1690314803
0x38038565...48af90DD3
0.0002 ETH
1073542372023-07-25 17:47:31298 days ago1690307251
0x38038565...48af90DD3
0.0012 ETH
1073174062023-07-24 21:19:49299 days ago1690233589
0x38038565...48af90DD3
0.0012 ETH
1073146152023-07-24 19:46:47299 days ago1690228007
0x38038565...48af90DD3
0.0002 ETH
1073124282023-07-24 18:33:53299 days ago1690223633
0x38038565...48af90DD3
0.0012 ETH
1072499012023-07-23 7:49:39300 days ago1690098579
0x38038565...48af90DD3
0.0012 ETH
1072122462023-07-22 10:54:29301 days ago1690023269
0x38038565...48af90DD3
0.0012 ETH
1072013072023-07-22 4:49:51301 days ago1690001391
0x38038565...48af90DD3
0.0012 ETH
1071872702023-07-21 21:01:57302 days ago1689973317
0x38038565...48af90DD3
0.0012 ETH
1071809612023-07-21 17:31:39302 days ago1689960699
0x38038565...48af90DD3
0.0002 ETH
1071805312023-07-21 17:17:19302 days ago1689959839
0x38038565...48af90DD3
0.0012 ETH
1071800382023-07-21 17:00:53302 days ago1689958853
0x38038565...48af90DD3
0.0012 ETH
1071755702023-07-21 14:31:57302 days ago1689949917
0x38038565...48af90DD3
0.0012 ETH
1071729972023-07-21 13:06:11302 days ago1689944771
0x38038565...48af90DD3
0.0004 ETH
1071673542023-07-21 9:58:05302 days ago1689933485
0x38038565...48af90DD3
0.0002 ETH
1071669902023-07-21 9:45:57302 days ago1689932757
0x38038565...48af90DD3
0.0012 ETH
1071663842023-07-21 9:25:45302 days ago1689931545
0x38038565...48af90DD3
0.0002 ETH
1071560632023-07-21 3:41:43302 days ago1689910903
0x38038565...48af90DD3
0.0002 ETH
1071505362023-07-21 0:37:29302 days ago1689899849
0x38038565...48af90DD3
0.0012 ETH
1071321022023-07-20 14:23:01303 days ago1689862981
0x38038565...48af90DD3
0.0012 ETH
1071320572023-07-20 14:21:31303 days ago1689862891
0x38038565...48af90DD3
0.001 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CliqueOPIssuerV2

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : CliqueOPIssuerV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {IAttestationStation} from "./IAttestationStation.sol";
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

error InvalidProjectId();
error WithdrawAddressNotSet();
error CallerNotRelayer();
error InvalidSignature();
error InsufficientFee(uint256 givenFee, uint256 expectedFee);

contract CliqueOPIssuerV2 is Initializable, OwnableUpgradeable {
    using ECDSA for bytes32;

    IAttestationStation public _attestationStation;

    address public _relayer;
    address public _withdrawAddress;

    mapping(string => bool) public _projectId; // projectId => bool
    mapping(string => uint256) public _attestationFee; // projectId => fee

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        _disableInitializers();
    }

    /// @notice Initializes the contract.
    /// @param attestationStation The address of the AttestationStation contract.
    /// @param relayer The address of the relayer.
    /// @param withdrawAddress The address of the withdraw address.
    function initialize(
        IAttestationStation attestationStation,
        address relayer,
        address withdrawAddress
    ) public initializer {
        __Ownable_init();
        _attestationStation = IAttestationStation(attestationStation);
        _relayer = relayer;
        _withdrawAddress = withdrawAddress;
    }

    /// @notice Sets the relayer address.
    /// @param relayer The address of the relayer.
    function setRelayer(address relayer) external onlyOwner {
        _relayer = relayer;
    }

    /// @notice Sets the withdraw address.
    /// @param withdrawAddress The address of the withdraw address.
    function setWithdrawAddress(address withdrawAddress) external onlyOwner {
        _withdrawAddress = withdrawAddress;
    }

    /// @notice Adds a new projectId.
    /// @param projectId The projectId.
    function setProjectId(string memory projectId) external onlyOwner {
        _projectId[projectId] = true;
    }

    /// @notice Sets the attestation fee for a projectId.
    /// @param projectId The projectId.
    /// @param fee The attestation fee.
    function setAttestationFee(
        string memory projectId,
        uint256 fee
    ) external onlyOwner {
        if (!_projectId[projectId]) revert InvalidProjectId();
        _attestationFee[projectId] = fee;
    }

    /// @notice Withdraws the contract balance to the withdraw address.
    function withdraw() external onlyOwner {
        if (_withdrawAddress == address(0)) revert WithdrawAddressNotSet();
        payable(_withdrawAddress).transfer(address(this).balance);
    }

    /// @notice Sets the AttestationStation contract address.
    /// @param attestionStation The address of the AttestationStation contract.
    function setAttestationStation(
        IAttestationStation attestionStation
    ) external onlyOwner {
        _attestationStation = IAttestationStation(attestionStation);
    }

    // User calls this function, in the AttestationStation contract,
    // msg.sender becomes this contract address (address(this))
    /// @notice Attests a set of attestations to a receiver. This function is to
    ///         be called by the user.
    /// @dev    Function requires the attestation data has been signed by the relayer
    ///         to attest to its validity.
    /// @param projectId The projectId, required to check the attestation fee.
    /// @param _attestations Attestations to be issued to a receiver.
    /// @param signature Attestations data signed by the relayer.
    function receiverAttest(
        string memory projectId,
        IAttestationStation.AttestationData[] memory _attestations,
        bytes memory signature
    ) external payable {
        uint256 expectedFee = _attestationFee[projectId] * _attestations.length;

        if (!_projectId[projectId]) revert InvalidProjectId();
        if (msg.value < expectedFee)
            revert InsufficientFee(msg.value, expectedFee);

        bytes32 messageHash = keccak256(
            abi.encode(projectId, _relayer, _attestations)
        );
        if (messageHash.toEthSignedMessageHash().recover(signature) != _relayer)
            revert InvalidSignature();

        // This calls OPs AttestationStation with CliqueOPIssuer address as msg.sender
        _attestationStation.attest(_attestations);
    }

    // User calls this function, in the AttestationStation contract,
    // msg.sender becomes this contract address (address(this))
    /// @notice Attests a set of attestations. This function can be called only
    ///         by the relayer.
    /// @dev    Function can be used to pay for gas fees with the relayer.
    /// @param _attestations Attestations to be issued.
    function relayerAttest(
        IAttestationStation.AttestationData[] memory _attestations
    ) external {
        if (msg.sender != _relayer) revert CallerNotRelayer();
        // This calls OPs AttestationStation with CliqueOPIssuer address as msg.sender
        _attestationStation.attest(_attestations);
    }
}

File 2 of 8 : IAttestationStation.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

interface IAttestationStation {
    struct AttestationData {
        address about;
        bytes32 key;
        bytes val;
    }

    event AttestationCreated(
        address indexed creator,
        address indexed about,
        bytes32 indexed key,
        bytes val
    );

    function attest(AttestationData[] memory _attestations) 
        external;
}

File 3 of 8 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

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

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

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

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 4 of 8 : 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 5 of 8 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

File 6 of 8 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

File 7 of 8 : 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 8 of 8 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallerNotRelayer","type":"error"},{"inputs":[{"internalType":"uint256","name":"givenFee","type":"uint256"},{"internalType":"uint256","name":"expectedFee","type":"uint256"}],"name":"InsufficientFee","type":"error"},{"inputs":[],"name":"InvalidProjectId","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"WithdrawAddressNotSet","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"_attestationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_attestationStation","outputs":[{"internalType":"contract IAttestationStation","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"_projectId","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_relayer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_withdrawAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IAttestationStation","name":"attestationStation","type":"address"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"address","name":"withdrawAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"projectId","type":"string"},{"components":[{"internalType":"address","name":"about","type":"address"},{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"bytes","name":"val","type":"bytes"}],"internalType":"struct IAttestationStation.AttestationData[]","name":"_attestations","type":"tuple[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"receiverAttest","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"about","type":"address"},{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"bytes","name":"val","type":"bytes"}],"internalType":"struct IAttestationStation.AttestationData[]","name":"_attestations","type":"tuple[]"}],"name":"relayerAttest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"projectId","type":"string"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setAttestationFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IAttestationStation","name":"attestionStation","type":"address"}],"name":"setAttestationStation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"projectId","type":"string"}],"name":"setProjectId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"relayer","type":"address"}],"name":"setRelayer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"withdrawAddress","type":"address"}],"name":"setWithdrawAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6112e7806100ed6000396000f3fe6080604052600436106100fe5760003560e01c80638da5cb5b11610095578063c0d3beb311610064578063c0d3beb3146102a8578063d794b2c9146102c8578063f2fde38b1461030e578063f856ba571461032e578063fd07bf181461034e57600080fd5b80638da5cb5b14610237578063940e50f614610255578063a0efe7bf14610275578063c0c53b8b1461028857600080fd5b8063596f0b45116100d1578063596f0b45146101aa5780636548e9bc146101e2578063715018a614610202578063891143b31461021757600080fd5b80632b0e85c21461010357806338536188146101255780633ab1a494146101755780633ccfd60b14610195575b600080fd5b34801561010f57600080fd5b5061012361011e366004610e40565b61036e565b005b34801561013157600080fd5b50610160610140366004610e85565b805160208183018101805160688252928201919093012091525460ff1681565b60405190151581526020015b60405180910390f35b34801561018157600080fd5b50610123610190366004610ed7565b6103db565b3480156101a157600080fd5b50610123610405565b3480156101b657600080fd5b506065546101ca906001600160a01b031681565b6040516001600160a01b03909116815260200161016c565b3480156101ee57600080fd5b506101236101fd366004610ed7565b610472565b34801561020e57600080fd5b5061012361049c565b34801561022357600080fd5b50610123610232366004610ed7565b6104b0565b34801561024357600080fd5b506033546001600160a01b03166101ca565b34801561026157600080fd5b506066546101ca906001600160a01b031681565b610123610283366004610feb565b6104da565b34801561029457600080fd5b506101236102a3366004611073565b6106b3565b3480156102b457600080fd5b506101236102c33660046110be565b610804565b3480156102d457600080fd5b506103006102e3366004610e85565b805160208183018101805160698252928201919093012091525481565b60405190815260200161016c565b34801561031a57600080fd5b50610123610329366004610ed7565b610894565b34801561033a57600080fd5b50610123610349366004610e85565b61090a565b34801561035a57600080fd5b506067546101ca906001600160a01b031681565b610376610947565b6068826040516103869190611117565b9081526040519081900360200190205460ff166103b657604051632af342d760e21b815260040160405180910390fd5b806069836040516103c79190611117565b908152604051908190036020019020555050565b6103e3610947565b606780546001600160a01b0319166001600160a01b0392909216919091179055565b61040d610947565b6067546001600160a01b03166104365760405163a68b8f8760e01b815260040160405180910390fd5b6067546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505015801561046f573d6000803e3d6000fd5b50565b61047a610947565b606680546001600160a01b0319166001600160a01b0392909216919091179055565b6104a4610947565b6104ae60006109a1565b565b6104b8610947565b606580546001600160a01b0319166001600160a01b0392909216919091179055565b600082516069856040516104ee9190611117565b9081526020016040518091039020546105079190611133565b90506068846040516105199190611117565b9081526040519081900360200190205460ff1661054957604051632af342d760e21b815260040160405180910390fd5b803410156105785760405163a458261b60e01b8152346004820152602481018290526044015b60405180910390fd5b60665460405160009161059b9187916001600160a01b03169087906020016111ff565b60408051601f1981840301815291905280516020909101206066549091506001600160a01b03166106238461061d846040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b906109f3565b6001600160a01b03161461064a57604051638baa579f60e01b815260040160405180910390fd5b6065546040516305eb5ea160e41b81526001600160a01b0390911690635eb5ea109061067a90879060040161123d565b600060405180830381600087803b15801561069457600080fd5b505af11580156106a8573d6000803e3d6000fd5b505050505050505050565b600054610100900460ff16158080156106d35750600054600160ff909116105b806106ed5750303b1580156106ed575060005460ff166001145b6107505760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161056f565b6000805460ff191660011790558015610773576000805461ff0019166101001790555b61077b610a19565b606580546001600160a01b038087166001600160a01b03199283161790925560668054868416908316179055606780549285169290911691909117905580156107fe576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6066546001600160a01b0316331461082f5760405163073f2fc760e51b815260040160405180910390fd5b6065546040516305eb5ea160e41b81526001600160a01b0390911690635eb5ea109061085f90849060040161123d565b600060405180830381600087803b15801561087957600080fd5b505af115801561088d573d6000803e3d6000fd5b5050505050565b61089c610947565b6001600160a01b0381166109015760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161056f565b61046f816109a1565b610912610947565b60016068826040516109249190611117565b908152604051908190036020019020805491151560ff1990921691909117905550565b6033546001600160a01b031633146104ae5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161056f565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806000610a028585610a48565b91509150610a0f81610a8d565b5090505b92915050565b600054610100900460ff16610a405760405162461bcd60e51b815260040161056f90611250565b6104ae610c43565b6000808251604103610a7e5760208301516040840151606085015160001a610a7287828585610c73565b94509450505050610a86565b506000905060025b9250929050565b6000816004811115610aa157610aa161129b565b03610aa95750565b6001816004811115610abd57610abd61129b565b03610b0a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161056f565b6002816004811115610b1e57610b1e61129b565b03610b6b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161056f565b6003816004811115610b7f57610b7f61129b565b03610bd75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161056f565b6004816004811115610beb57610beb61129b565b0361046f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161056f565b600054610100900460ff16610c6a5760405162461bcd60e51b815260040161056f90611250565b6104ae336109a1565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610caa5750600090506003610d57565b8460ff16601b14158015610cc257508460ff16601c14155b15610cd35750600090506004610d57565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610d27573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d5057600060019250925050610d57565b9150600090505b94509492505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610d9957610d99610d60565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610dc857610dc8610d60565b604052919050565b600082601f830112610de157600080fd5b813567ffffffffffffffff811115610dfb57610dfb610d60565b610e0e601f8201601f1916602001610d9f565b818152846020838601011115610e2357600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215610e5357600080fd5b823567ffffffffffffffff811115610e6a57600080fd5b610e7685828601610dd0565b95602094909401359450505050565b600060208284031215610e9757600080fd5b813567ffffffffffffffff811115610eae57600080fd5b610eba84828501610dd0565b949350505050565b6001600160a01b038116811461046f57600080fd5b600060208284031215610ee957600080fd5b8135610ef481610ec2565b9392505050565b600082601f830112610f0c57600080fd5b8135602067ffffffffffffffff80831115610f2957610f29610d60565b8260051b610f38838201610d9f565b9384528581018301938381019088861115610f5257600080fd5b84880192505b85831015610fdf57823584811115610f705760008081fd5b88016060818b03601f1901811315610f885760008081fd5b610f90610d76565b87830135610f9d81610ec2565b815260408381013589830152918301359187831115610fbc5760008081fd5b610fca8d8a85870101610dd0565b90820152845250509184019190840190610f58565b98975050505050505050565b60008060006060848603121561100057600080fd5b833567ffffffffffffffff8082111561101857600080fd5b61102487838801610dd0565b9450602086013591508082111561103a57600080fd5b61104687838801610efb565b9350604086013591508082111561105c57600080fd5b5061106986828701610dd0565b9150509250925092565b60008060006060848603121561108857600080fd5b833561109381610ec2565b925060208401356110a381610ec2565b915060408401356110b381610ec2565b809150509250925092565b6000602082840312156110d057600080fd5b813567ffffffffffffffff8111156110e757600080fd5b610eba84828501610efb565b60005b8381101561110e5781810151838201526020016110f6565b50506000910152565b600082516111298184602087016110f3565b9190910192915050565b8082028115828204841417610a1357634e487b7160e01b600052601160045260246000fd5b600081518084526111708160208601602086016110f3565b601f01601f19169290920160200192915050565b6000815180845260208085019450848260051b860182860160005b858110156111f2578383038952815180516001600160a01b0316845285810151868501526040908101516060918501829052906111de81860183611158565b9a87019a945050509084019060010161119f565b5090979650505050505050565b6060815260006112126060830186611158565b6001600160a01b038516602084015282810360408401526112338185611184565b9695505050505050565b602081526000610ef46020830184611184565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220e5c51616d7d1bd10681dac752571c34b6422fb4310e640f718354ebd387378f364736f6c63430008110033

Deployed Bytecode

0x6080604052600436106100fe5760003560e01c80638da5cb5b11610095578063c0d3beb311610064578063c0d3beb3146102a8578063d794b2c9146102c8578063f2fde38b1461030e578063f856ba571461032e578063fd07bf181461034e57600080fd5b80638da5cb5b14610237578063940e50f614610255578063a0efe7bf14610275578063c0c53b8b1461028857600080fd5b8063596f0b45116100d1578063596f0b45146101aa5780636548e9bc146101e2578063715018a614610202578063891143b31461021757600080fd5b80632b0e85c21461010357806338536188146101255780633ab1a494146101755780633ccfd60b14610195575b600080fd5b34801561010f57600080fd5b5061012361011e366004610e40565b61036e565b005b34801561013157600080fd5b50610160610140366004610e85565b805160208183018101805160688252928201919093012091525460ff1681565b60405190151581526020015b60405180910390f35b34801561018157600080fd5b50610123610190366004610ed7565b6103db565b3480156101a157600080fd5b50610123610405565b3480156101b657600080fd5b506065546101ca906001600160a01b031681565b6040516001600160a01b03909116815260200161016c565b3480156101ee57600080fd5b506101236101fd366004610ed7565b610472565b34801561020e57600080fd5b5061012361049c565b34801561022357600080fd5b50610123610232366004610ed7565b6104b0565b34801561024357600080fd5b506033546001600160a01b03166101ca565b34801561026157600080fd5b506066546101ca906001600160a01b031681565b610123610283366004610feb565b6104da565b34801561029457600080fd5b506101236102a3366004611073565b6106b3565b3480156102b457600080fd5b506101236102c33660046110be565b610804565b3480156102d457600080fd5b506103006102e3366004610e85565b805160208183018101805160698252928201919093012091525481565b60405190815260200161016c565b34801561031a57600080fd5b50610123610329366004610ed7565b610894565b34801561033a57600080fd5b50610123610349366004610e85565b61090a565b34801561035a57600080fd5b506067546101ca906001600160a01b031681565b610376610947565b6068826040516103869190611117565b9081526040519081900360200190205460ff166103b657604051632af342d760e21b815260040160405180910390fd5b806069836040516103c79190611117565b908152604051908190036020019020555050565b6103e3610947565b606780546001600160a01b0319166001600160a01b0392909216919091179055565b61040d610947565b6067546001600160a01b03166104365760405163a68b8f8760e01b815260040160405180910390fd5b6067546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505015801561046f573d6000803e3d6000fd5b50565b61047a610947565b606680546001600160a01b0319166001600160a01b0392909216919091179055565b6104a4610947565b6104ae60006109a1565b565b6104b8610947565b606580546001600160a01b0319166001600160a01b0392909216919091179055565b600082516069856040516104ee9190611117565b9081526020016040518091039020546105079190611133565b90506068846040516105199190611117565b9081526040519081900360200190205460ff1661054957604051632af342d760e21b815260040160405180910390fd5b803410156105785760405163a458261b60e01b8152346004820152602481018290526044015b60405180910390fd5b60665460405160009161059b9187916001600160a01b03169087906020016111ff565b60408051601f1981840301815291905280516020909101206066549091506001600160a01b03166106238461061d846040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b906109f3565b6001600160a01b03161461064a57604051638baa579f60e01b815260040160405180910390fd5b6065546040516305eb5ea160e41b81526001600160a01b0390911690635eb5ea109061067a90879060040161123d565b600060405180830381600087803b15801561069457600080fd5b505af11580156106a8573d6000803e3d6000fd5b505050505050505050565b600054610100900460ff16158080156106d35750600054600160ff909116105b806106ed5750303b1580156106ed575060005460ff166001145b6107505760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161056f565b6000805460ff191660011790558015610773576000805461ff0019166101001790555b61077b610a19565b606580546001600160a01b038087166001600160a01b03199283161790925560668054868416908316179055606780549285169290911691909117905580156107fe576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6066546001600160a01b0316331461082f5760405163073f2fc760e51b815260040160405180910390fd5b6065546040516305eb5ea160e41b81526001600160a01b0390911690635eb5ea109061085f90849060040161123d565b600060405180830381600087803b15801561087957600080fd5b505af115801561088d573d6000803e3d6000fd5b5050505050565b61089c610947565b6001600160a01b0381166109015760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161056f565b61046f816109a1565b610912610947565b60016068826040516109249190611117565b908152604051908190036020019020805491151560ff1990921691909117905550565b6033546001600160a01b031633146104ae5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161056f565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806000610a028585610a48565b91509150610a0f81610a8d565b5090505b92915050565b600054610100900460ff16610a405760405162461bcd60e51b815260040161056f90611250565b6104ae610c43565b6000808251604103610a7e5760208301516040840151606085015160001a610a7287828585610c73565b94509450505050610a86565b506000905060025b9250929050565b6000816004811115610aa157610aa161129b565b03610aa95750565b6001816004811115610abd57610abd61129b565b03610b0a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161056f565b6002816004811115610b1e57610b1e61129b565b03610b6b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161056f565b6003816004811115610b7f57610b7f61129b565b03610bd75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161056f565b6004816004811115610beb57610beb61129b565b0361046f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161056f565b600054610100900460ff16610c6a5760405162461bcd60e51b815260040161056f90611250565b6104ae336109a1565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610caa5750600090506003610d57565b8460ff16601b14158015610cc257508460ff16601c14155b15610cd35750600090506004610d57565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610d27573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d5057600060019250925050610d57565b9150600090505b94509492505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610d9957610d99610d60565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610dc857610dc8610d60565b604052919050565b600082601f830112610de157600080fd5b813567ffffffffffffffff811115610dfb57610dfb610d60565b610e0e601f8201601f1916602001610d9f565b818152846020838601011115610e2357600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215610e5357600080fd5b823567ffffffffffffffff811115610e6a57600080fd5b610e7685828601610dd0565b95602094909401359450505050565b600060208284031215610e9757600080fd5b813567ffffffffffffffff811115610eae57600080fd5b610eba84828501610dd0565b949350505050565b6001600160a01b038116811461046f57600080fd5b600060208284031215610ee957600080fd5b8135610ef481610ec2565b9392505050565b600082601f830112610f0c57600080fd5b8135602067ffffffffffffffff80831115610f2957610f29610d60565b8260051b610f38838201610d9f565b9384528581018301938381019088861115610f5257600080fd5b84880192505b85831015610fdf57823584811115610f705760008081fd5b88016060818b03601f1901811315610f885760008081fd5b610f90610d76565b87830135610f9d81610ec2565b815260408381013589830152918301359187831115610fbc5760008081fd5b610fca8d8a85870101610dd0565b90820152845250509184019190840190610f58565b98975050505050505050565b60008060006060848603121561100057600080fd5b833567ffffffffffffffff8082111561101857600080fd5b61102487838801610dd0565b9450602086013591508082111561103a57600080fd5b61104687838801610efb565b9350604086013591508082111561105c57600080fd5b5061106986828701610dd0565b9150509250925092565b60008060006060848603121561108857600080fd5b833561109381610ec2565b925060208401356110a381610ec2565b915060408401356110b381610ec2565b809150509250925092565b6000602082840312156110d057600080fd5b813567ffffffffffffffff8111156110e757600080fd5b610eba84828501610efb565b60005b8381101561110e5781810151838201526020016110f6565b50506000910152565b600082516111298184602087016110f3565b9190910192915050565b8082028115828204841417610a1357634e487b7160e01b600052601160045260246000fd5b600081518084526111708160208601602086016110f3565b601f01601f19169290920160200192915050565b6000815180845260208085019450848260051b860182860160005b858110156111f2578383038952815180516001600160a01b0316845285810151868501526040908101516060918501829052906111de81860183611158565b9a87019a945050509084019060010161119f565b5090979650505050505050565b6060815260006112126060830186611158565b6001600160a01b038516602084015282810360408401526112338185611184565b9695505050505050565b602081526000610ef46020830184611184565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220e5c51616d7d1bd10681dac752571c34b6422fb4310e640f718354ebd387378f364736f6c63430008110033

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
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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