ETH Price: $3,419.50 (+3.74%)

Contract

0x4c175eE61C3c1da847E339e1158D61BBd2537046
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Propagate Root212507232024-11-23 13:24:472 mins ago1732368287IN
0x4c175eE6...Bd2537046
0 ETH0.0024420513.45989784
Propagate Root212504242024-11-23 12:24:471 hr ago1732364687IN
0x4c175eE6...Bd2537046
0 ETH0.002074659.3587828
Propagate Root212501262024-11-23 11:25:112 hrs ago1732361111IN
0x4c175eE6...Bd2537046
0 ETH0.002084579.38896132
Propagate Root212498252024-11-23 10:24:473 hrs ago1732357487IN
0x4c175eE6...Bd2537046
0 ETH0.002156989.86021106
Propagate Root212495262024-11-23 9:24:474 hrs ago1732353887IN
0x4c175eE6...Bd2537046
0 ETH0.002125769.81008423
Propagate Root212492262024-11-23 8:24:475 hrs ago1732350287IN
0x4c175eE6...Bd2537046
0 ETH0.0023023111.54091225
Propagate Root212489272024-11-23 7:24:476 hrs ago1732346687IN
0x4c175eE6...Bd2537046
0 ETH0.002121589.82197177
Propagate Root212486282024-11-23 6:24:477 hrs ago1732343087IN
0x4c175eE6...Bd2537046
0 ETH0.002102299.64055169
Propagate Root212483052024-11-23 5:19:478 hrs ago1732339187IN
0x4c175eE6...Bd2537046
0 ETH0.002080249.46476891
Propagate Root212480062024-11-23 4:19:479 hrs ago1732335587IN
0x4c175eE6...Bd2537046
0 ETH0.002401213.15988178
Propagate Root212477072024-11-23 3:19:4710 hrs ago1732331987IN
0x4c175eE6...Bd2537046
0 ETH0.0022055510.85921598
Propagate Root212474072024-11-23 2:19:4711 hrs ago1732328387IN
0x4c175eE6...Bd2537046
0 ETH0.0022222111.20700916
Propagate Root212471082024-11-23 1:19:4712 hrs ago1732324787IN
0x4c175eE6...Bd2537046
0 ETH0.0024031313.37214976
Propagate Root212468092024-11-23 0:19:4713 hrs ago1732321187IN
0x4c175eE6...Bd2537046
0 ETH0.0024171413.24726896
Propagate Root212466102024-11-22 23:39:4713 hrs ago1732318787IN
0x4c175eE6...Bd2537046
0 ETH0.0025044514.26355289
Propagate Root212464612024-11-22 23:09:4714 hrs ago1732316987IN
0x4c175eE6...Bd2537046
0 ETH0.0024213113.55111907
Propagate Root212463362024-11-22 22:44:4714 hrs ago1732315487IN
0x4c175eE6...Bd2537046
0 ETH0.0026216715.94653897
Propagate Root212462372024-11-22 22:24:4715 hrs ago1732314287IN
0x4c175eE6...Bd2537046
0 ETH0.0027970418.19332278
Propagate Root212461372024-11-22 22:04:4715 hrs ago1732313087IN
0x4c175eE6...Bd2537046
0 ETH0.0029847420.37144852
Propagate Root212460382024-11-22 21:44:4715 hrs ago1732311887IN
0x4c175eE6...Bd2537046
0 ETH0.0030336921.00140432
Propagate Root212459632024-11-22 21:29:4715 hrs ago1732310987IN
0x4c175eE6...Bd2537046
0 ETH0.0029240219.72545457
Propagate Root212458632024-11-22 21:09:4716 hrs ago1732309787IN
0x4c175eE6...Bd2537046
0 ETH0.0028391218.48776766
Propagate Root212457882024-11-22 20:54:4716 hrs ago1732308887IN
0x4c175eE6...Bd2537046
0 ETH0.0026957116.34561561
Propagate Root212457132024-11-22 20:39:4716 hrs ago1732307987IN
0x4c175eE6...Bd2537046
0 ETH0.0022276611.04292694
Propagate Root212456132024-11-22 20:19:4717 hrs ago1732306787IN
0x4c175eE6...Bd2537046
0 ETH0.0023369912.38759744
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xa6d85F3b...ce252b79F
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
OpStateBridge

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 10000 runs

Other Settings:
london EvmVersion
File 1 of 9 : OpStateBridge.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

// Optimism interface for cross domain messaging
import {ICrossDomainMessenger} from
    "@eth-optimism/contracts/libraries/bridge/ICrossDomainMessenger.sol";
import {IOpWorldID} from "./interfaces/IOpWorldID.sol";
import {IRootHistory} from "./interfaces/IRootHistory.sol";
import {IWorldIDIdentityManager} from "./interfaces/IWorldIDIdentityManager.sol";
import {Ownable2Step} from "openzeppelin-contracts/access/Ownable2Step.sol";
import {ICrossDomainOwnable3} from "./interfaces/ICrossDomainOwnable3.sol";

/// @title World ID State Bridge Optimism
/// @author Worldcoin
/// @notice Distributes new World ID Identity Manager roots to an OP Stack network
/// @dev This contract lives on Ethereum mainnet and works for Optimism and any OP Stack based chain
contract OpStateBridge is Ownable2Step {
    ///////////////////////////////////////////////////////////////////
    ///                           STORAGE                           ///
    ///////////////////////////////////////////////////////////////////

    /// @notice The address of the OpWorldID contract on any OP Stack chain
    address public immutable opWorldIDAddress;

    /// @notice address for OP Stack chain Ethereum mainnet L1CrossDomainMessenger contract
    address internal immutable crossDomainMessengerAddress;

    /// @notice Ethereum mainnet worldID Address
    address public immutable worldIDAddress;

    /// @notice Amount of gas purchased on the OP Stack chain for propagateRoot
    uint32 internal _gasLimitPropagateRoot;

    /// @notice Amount of gas purchased on the OP Stack chain for SetRootHistoryExpiry
    uint32 internal _gasLimitSetRootHistoryExpiry;

    /// @notice Amount of gas purchased on the OP Stack chain for transferOwnershipOp
    uint32 internal _gasLimitTransferOwnership;

    /// @notice The default gas limit amount to buy on an OP stack chain to do simple transactions
    uint32 public constant DEFAULT_OP_GAS_LIMIT = 1000000;

    ///////////////////////////////////////////////////////////////////
    ///                            EVENTS                           ///
    ///////////////////////////////////////////////////////////////////

    /// @notice Emitted when the StateBridge gives ownership of the OPWorldID contract
    /// to the WorldID Identity Manager contract away
    /// @param previousOwner The previous owner of the OPWorldID contract
    /// @param newOwner The new owner of the OPWorldID contract
    /// @param isLocal Whether the ownership transfer is local (Optimism/OP Stack chain EOA/contract)
    /// or an Ethereum EOA or contract
    event OwnershipTransferredOp(
        address indexed previousOwner, address indexed newOwner, bool isLocal
    );

    /// @notice Emitted when the StateBridge sends a root to the OPWorldID contract
    /// @param root The root sent to the OPWorldID contract on the OP Stack chain
    event RootPropagated(uint256 root);

    /// @notice Emitted when the StateBridge sets the root history expiry for OpWorldID and PolygonWorldID
    /// @param rootHistoryExpiry The new root history expiry
    event SetRootHistoryExpiry(uint256 rootHistoryExpiry);

    /// @notice Emitted when the StateBridge sets the gas limit for sendRootOp
    /// @param _opGasLimit The new opGasLimit for sendRootOp
    event SetGasLimitPropagateRoot(uint32 _opGasLimit);

    /// @notice Emitted when the StateBridge sets the gas limit for SetRootHistoryExpiry
    /// @param _opGasLimit The new opGasLimit for SetRootHistoryExpiry
    event SetGasLimitSetRootHistoryExpiry(uint32 _opGasLimit);

    /// @notice Emitted when the StateBridge sets the gas limit for transferOwnershipOp
    /// @param _opGasLimit The new opGasLimit for transferOwnershipOptimism
    event SetGasLimitTransferOwnershipOp(uint32 _opGasLimit);

    ///////////////////////////////////////////////////////////////////
    ///                            ERRORS                           ///
    ///////////////////////////////////////////////////////////////////

    /// @notice Emitted when an attempt is made to renounce ownership.
    error CannotRenounceOwnership();

    /// @notice Emitted when an attempt is made to set the gas limit to zero
    error GasLimitZero();

    /// @notice Emitted when an attempt is made to set an address to zero
    error AddressZero();

    ///////////////////////////////////////////////////////////////////
    ///                         CONSTRUCTOR                         ///
    ///////////////////////////////////////////////////////////////////

    /// @notice constructor
    /// @param _worldIDIdentityManager Deployment address of the WorldID Identity Manager contract
    /// @param _opWorldIDAddress Address of the Optimism contract that will receive the new root and timestamp
    /// @param _crossDomainMessenger L1CrossDomainMessenger contract used to communicate with the desired OP
    /// Stack network
    /// @custom:revert if any of the constructor params addresses are zero
    constructor(
        address _worldIDIdentityManager,
        address _opWorldIDAddress,
        address _crossDomainMessenger
    ) {
        if (
            _worldIDIdentityManager == address(0) || _opWorldIDAddress == address(0)
                || _crossDomainMessenger == address(0)
        ) {
            revert AddressZero();
        }

        opWorldIDAddress = _opWorldIDAddress;
        worldIDAddress = _worldIDIdentityManager;
        crossDomainMessengerAddress = _crossDomainMessenger;
        _gasLimitPropagateRoot = DEFAULT_OP_GAS_LIMIT;
        _gasLimitSetRootHistoryExpiry = DEFAULT_OP_GAS_LIMIT;
        _gasLimitTransferOwnership = DEFAULT_OP_GAS_LIMIT;
    }

    ///////////////////////////////////////////////////////////////////
    ///                          PUBLIC API                         ///
    ///////////////////////////////////////////////////////////////////

    /// @notice Sends the latest WorldID Identity Manager root to the IOpStack.
    /// @dev Calls this method on the L1 Proxy contract to relay roots to the destination OP Stack chain
    function propagateRoot() external {
        uint256 latestRoot = IWorldIDIdentityManager(worldIDAddress).latestRoot();

        // The `encodeCall` function is strongly typed, so this checks that we are passing the
        // correct data to the optimism bridge.
        bytes memory message = abi.encodeCall(IOpWorldID.receiveRoot, (latestRoot));

        ICrossDomainMessenger(crossDomainMessengerAddress).sendMessage(
            // Contract address on the OP Stack Chain
            opWorldIDAddress,
            message,
            _gasLimitPropagateRoot
        );

        emit RootPropagated(latestRoot);
    }

    /// @notice Adds functionality to the StateBridge to transfer ownership
    /// of OpWorldID to another contract on L1 or to a local OP Stack chain EOA
    /// @param _owner new owner (EOA or contract)
    /// @param _isLocal true if new owner is on Optimism, false if it is a cross-domain owner
    /// @custom:revert if _owner is set to the zero address
    function transferOwnershipOp(address _owner, bool _isLocal) external onlyOwner {
        if (_owner == address(0)) {
            revert AddressZero();
        }

        // The `encodeCall` function is strongly typed, so this checks that we are passing the
        // correct data to the OP Stack chain bridge.
        bytes memory message =
            abi.encodeCall(ICrossDomainOwnable3.transferOwnership, (_owner, _isLocal));

        ICrossDomainMessenger(crossDomainMessengerAddress).sendMessage(
            // Contract address on the OP Stack Chain
            opWorldIDAddress,
            message,
            _gasLimitTransferOwnership
        );

        emit OwnershipTransferredOp(owner(), _owner, _isLocal);
    }

    /// @notice Adds functionality to the StateBridge to set the root history expiry on OpWorldID
    /// @param _rootHistoryExpiry new root history expiry
    function setRootHistoryExpiry(uint256 _rootHistoryExpiry) external onlyOwner {
        // The `encodeCall` function is strongly typed, so this checks that we are passing the
        // correct data to the optimism bridge.
        bytes memory message =
            abi.encodeCall(IRootHistory.setRootHistoryExpiry, (_rootHistoryExpiry));

        ICrossDomainMessenger(crossDomainMessengerAddress).sendMessage(
            // Contract address on the OP Stack Chain
            opWorldIDAddress,
            message,
            _gasLimitSetRootHistoryExpiry
        );

        emit SetRootHistoryExpiry(_rootHistoryExpiry);
    }

    ///////////////////////////////////////////////////////////////////
    ///                         OP GAS LIMIT                        ///
    ///////////////////////////////////////////////////////////////////

    /// @notice Sets the gas limit for the propagateRoot method
    /// @param _opGasLimit The new gas limit for the propagateRoot method
    function setGasLimitPropagateRoot(uint32 _opGasLimit) external onlyOwner {
        if (_opGasLimit <= 0) {
            revert GasLimitZero();
        }

        _gasLimitPropagateRoot = _opGasLimit;

        emit SetGasLimitPropagateRoot(_opGasLimit);
    }

    /// @notice Sets the gas limit for the SetRootHistoryExpiry method
    /// @param _opGasLimit The new gas limit for the SetRootHistoryExpiry method
    function setGasLimitSetRootHistoryExpiry(uint32 _opGasLimit) external onlyOwner {
        if (_opGasLimit <= 0) {
            revert GasLimitZero();
        }

        _gasLimitSetRootHistoryExpiry = _opGasLimit;

        emit SetGasLimitSetRootHistoryExpiry(_opGasLimit);
    }

    /// @notice Sets the gas limit for the transferOwnershipOp method
    /// @param _opGasLimit The new gas limit for the transferOwnershipOp method
    function setGasLimitTransferOwnershipOp(uint32 _opGasLimit) external onlyOwner {
        if (_opGasLimit <= 0) {
            revert GasLimitZero();
        }

        _gasLimitTransferOwnership = _opGasLimit;

        emit SetGasLimitTransferOwnershipOp(_opGasLimit);
    }

    ///////////////////////////////////////////////////////////////////
    ///                          OWNERSHIP                          ///
    ///////////////////////////////////////////////////////////////////
    /// @notice Ensures that ownership of WorldID implementations cannot be renounced.
    /// @dev This function is intentionally not `virtual` as we do not want it to be possible to
    ///      renounce ownership for any WorldID implementation.
    /// @dev This function is marked as `onlyOwner` to maintain the access restriction from the base
    ///      contract.
    function renounceOwnership() public view override onlyOwner {
        revert CannotRenounceOwnership();
    }
}

File 2 of 9 : ICrossDomainMessenger.sol
// SPDX-License-Identifier: MIT
pragma solidity >0.5.0 <0.9.0;

/**
 * @title ICrossDomainMessenger
 */
interface ICrossDomainMessenger {
    /**********
     * Events *
     **********/

    event SentMessage(
        address indexed target,
        address sender,
        bytes message,
        uint256 messageNonce,
        uint256 gasLimit
    );
    event RelayedMessage(bytes32 indexed msgHash);
    event FailedRelayedMessage(bytes32 indexed msgHash);

    /*************
     * Variables *
     *************/

    function xDomainMessageSender() external view returns (address);

    /********************
     * Public Functions *
     ********************/

    /**
     * Sends a cross domain message to the target messenger.
     * @param _target Target contract address.
     * @param _message Message to send to the target.
     * @param _gasLimit Gas limit for the provided message.
     */
    function sendMessage(
        address _target,
        bytes calldata _message,
        uint32 _gasLimit
    ) external;
}

File 3 of 9 : IOpWorldID.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

/// @title Interface for the OpWorldID contract
/// @author Worldcoin
/// @custom:usage abi.encodeCall(IOpWorldID.receiveRoot, (_newRoot, _supersedeTimestamp));
interface IOpWorldID {
    ////////////////////////////////////////////////////////////////////////////////
    ///                               ROOT MIRRORING                            ///
    ///////////////////////////////////////////////////////////////////////////////

    /// @notice This function is called by the state bridge contract when it forwards a new root to
    ///         the bridged WorldID.
    /// @dev    This function can revert if Optimism's CrossDomainMessenger stops processing proofs
    ///         or if OPLabs stops submitting them. Next iteration of Optimism's cross-domain messaging, will be
    ///         fully permissionless for message-passing, so this will not be an issue.
    ///         Sequencer needs to include changes to the CrossDomainMessenger contract on L1, not economically penalized
    ///         if messages are not included, however the fraud prover (Cannon) can force the sequencer to include it.
    ///
    /// @param newRoot The value of the new root.
    ///
    /// @custom:reverts CannotOverwriteRoot If the root already exists in the root history.
    /// @custom:reverts string If the caller is not the owner.
    function receiveRoot(uint256 newRoot) external;
}

File 4 of 9 : IRootHistory.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

/// @title Interface for WorldID setRooHistoryExpiry
/// @author Worldcoin
/// @notice Interface for WorldID setRooHistoryExpiry
/// @dev Used in StateBridge to set the root history expiry time on Optimism (OPWorldID)
/// @custom:usage abi.encodeCall(IRootHistory.setRootHistoryExpiry, (_expiryTime));
interface IRootHistory {
    /// @notice Sets the amount of time it takes for a root in the root history to expire.
    ///
    /// @param expiryTime The new amount of time it takes for a root to expire.
    ///
    /// @custom:reverts string If the caller is not the owner.
    function setRootHistoryExpiry(uint256 expiryTime) external;
}

File 5 of 9 : IWorldIDIdentityManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

/// @title IWorldIDIdentityManager
/// @author Worldcoin
/// @dev used to fetch the latest root from the WorldIDIdentityManager
interface IWorldIDIdentityManager {
    /// @notice returns the latest root
    function latestRoot() external view returns (uint256);
}

File 6 of 9 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.0;

import "./Ownable.sol";

/**
 * @dev Contract module which provides 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} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

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

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() external {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}

File 7 of 9 : ICrossDomainOwnable3.sol
pragma solidity ^0.8.15;

/// @title Optimism - CrossDomainOwnable3 Interface
/// @author Worldcoin
/// @notice Interface for the CrossDomainOwnable contract for the Optimism L2
/// @dev Adds functionality to the StateBridge to transfer ownership
/// of OpWorldID to another contract on L1 or to a local Optimism EOA
/// @custom:usage abi.encodeCall(ICrossDomainOwnable3.transferOwnership, (_owner, _isLocal));
interface ICrossDomainOwnable3 {
    /// @notice transfers owner to a cross-domain or local owner
    /// @param _owner new owner (EOA or contract)
    /// @param _isLocal true if new owner is on Optimism, false if it is a cross-domain owner
    function transferOwnership(address _owner, bool _isLocal) external;
}

File 8 of 9 : 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 9 of 9 : 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
{
  "remappings": [
    "@prb/test/=lib/prb-test/src/",
    "forge-std/=lib/forge-std/src/",
    "src/=src/",
    "semaphore/=lib/semaphore-v3/packages/contracts/contracts/",
    "solmate/=lib/solmate/",
    "@rari-capital/solmate/=lib/solmate/",
    "@eth-optimism/contracts/=node_modules/@eth-optimism/contracts/",
    "@eth-optimism/contracts-bedrock/=node_modules/@eth-optimism/contracts-bedrock/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "fx-portal/contracts/=lib/contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "prb-test/=lib/prb-test/src/",
    "semaphore-v3/=lib/semaphore-v3/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000,
    "details": {
      "peephole": true,
      "inliner": true,
      "deduplicate": true,
      "cse": true,
      "yul": true
    }
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_worldIDIdentityManager","type":"address"},{"internalType":"address","name":"_opWorldIDAddress","type":"address"},{"internalType":"address","name":"_crossDomainMessenger","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressZero","type":"error"},{"inputs":[],"name":"CannotRenounceOwnership","type":"error"},{"inputs":[],"name":"GasLimitZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"},{"indexed":false,"internalType":"bool","name":"isLocal","type":"bool"}],"name":"OwnershipTransferredOp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"root","type":"uint256"}],"name":"RootPropagated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"_opGasLimit","type":"uint32"}],"name":"SetGasLimitPropagateRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"_opGasLimit","type":"uint32"}],"name":"SetGasLimitSetRootHistoryExpiry","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"_opGasLimit","type":"uint32"}],"name":"SetGasLimitTransferOwnershipOp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rootHistoryExpiry","type":"uint256"}],"name":"SetRootHistoryExpiry","type":"event"},{"inputs":[],"name":"DEFAULT_OP_GAS_LIMIT","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"opWorldIDAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"propagateRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_opGasLimit","type":"uint32"}],"name":"setGasLimitPropagateRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_opGasLimit","type":"uint32"}],"name":"setGasLimitSetRootHistoryExpiry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_opGasLimit","type":"uint32"}],"name":"setGasLimitTransferOwnershipOp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rootHistoryExpiry","type":"uint256"}],"name":"setRootHistoryExpiry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bool","name":"_isLocal","type":"bool"}],"name":"transferOwnershipOp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"worldIDAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063a3b801a31161008c578063c70aa72711610066578063c70aa727146101e7578063e30c3978146101fa578063e84d647414610218578063f2fde38b1461023757600080fd5b8063a3b801a314610186578063ab6dab0d14610199578063b665a5b2146101c057600080fd5b8063715018a6116100c8578063715018a61461011f57806379ba5097146101275780638a8fcec41461012f5780638da5cb5b1461014257600080fd5b80631c56fe40146100ef578063380db829146101045780634eb6840c1461010c575b600080fd5b6101026100fd366004610deb565b61024a565b005b610102610316565b61010261011a366004610deb565b61055e565b610102610627565b610102610661565b61010261013d366004610e41565b61071b565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610102610194366004610deb565b610994565b61015c7f000000000000000000000000047ee5313f98e26cc8177fa38877cb36292d236481565b61015c7f000000000000000000000000f7134ce138832c1456f2a91d64621ee90c2bddea81565b6101026101f5366004610e7d565b610a5d565b60015473ffffffffffffffffffffffffffffffffffffffff1661015c565b610222620f424081565b60405163ffffffff909116815260200161017d565b610102610245366004610e96565b610c12565b610252610d37565b60008163ffffffff1611610292576040517f90ecd8f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527ffa2a99078de4d1b0d18381a1d80698c2798f5a987838280224694c908b4b7607906020015b60405180910390a150565b60007f000000000000000000000000f7134ce138832c1456f2a91d64621ee90c2bddea73ffffffffffffffffffffffffffffffffffffffff1663d7b0fef16040518163ffffffff1660e01b8152600401602060405180830381865afa158015610383573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a79190610eb1565b90506000816040516024016103be91815260200190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529181526020820180517ffbde929b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911617905260015490517f3dbb202b0000000000000000000000000000000000000000000000000000000081529192507f000000000000000000000000f931a81d18b1766d15695ffc7c1920a62b7e710a73ffffffffffffffffffffffffffffffffffffffff1691633dbb202b916104ef917f000000000000000000000000047ee5313f98e26cc8177fa38877cb36292d23649186917401000000000000000000000000000000000000000090910463ffffffff1690600401610eca565b600060405180830381600087803b15801561050957600080fd5b505af115801561051d573d6000803e3d6000fd5b505050507fd8f3e639501c4b5e551a948a2930f1215556bcde417c94d45746a8ec6418366f8260405161055291815260200190565b60405180910390a15050565b610566610d37565b60008163ffffffff16116105a6576040517f90ecd8f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527fb588f307d3dd92c5dae6b4ac79ad106af16c06b664d6afc62480daa61fe624e79060200161030b565b61062f610d37565b6040517f77aeb0ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600154339073ffffffffffffffffffffffffffffffffffffffff16811461070f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61071881610dba565b50565b610723610d37565b73ffffffffffffffffffffffffffffffffffffffff8216610770576040517f9fabe1c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff831660248201528115156044820152600090606401604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529181526020820180517fb242e534000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911617905260015490517f3dbb202b0000000000000000000000000000000000000000000000000000000081529192507f000000000000000000000000f931a81d18b1766d15695ffc7c1920a62b7e710a73ffffffffffffffffffffffffffffffffffffffff1691633dbb202b916108d6917f000000000000000000000000047ee5313f98e26cc8177fa38877cb36292d23649186917c010000000000000000000000000000000000000000000000000000000090910463ffffffff1690600401610eca565b600060405180830381600087803b1580156108f057600080fd5b505af1158015610904573d6000803e3d6000fd5b505050508273ffffffffffffffffffffffffffffffffffffffff1661093e60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f763ef977ad8eb40834384c417cf481dc800c87822c6a7feef8726a6566b6b12584604051610987911515815260200190565b60405180910390a3505050565b61099c610d37565b60008163ffffffff16116109dc576040517f90ecd8f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000063ffffffff8416908102919091179091556040519081527fc48e688c0a2fc42ce36ecb7204c7b77f96132d253c141ef46c2591ae5a7763729060200161030b565b610a65610d37565b600081604051602401610a7a91815260200190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529181526020820180517fc70aa727000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911617905260015490517f3dbb202b0000000000000000000000000000000000000000000000000000000081529192507f000000000000000000000000f931a81d18b1766d15695ffc7c1920a62b7e710a73ffffffffffffffffffffffffffffffffffffffff1691633dbb202b91610baf917f000000000000000000000000047ee5313f98e26cc8177fa38877cb36292d2364918691780100000000000000000000000000000000000000000000000090910463ffffffff1690600401610eca565b600060405180830381600087803b158015610bc957600080fd5b505af1158015610bdd573d6000803e3d6000fd5b505050507f9036872f40830f3909d8006c77be543a639ad4ebb34aff720498fcd12656a2928260405161055291815260200190565b610c1a610d37565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610c7d60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610db8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610706565b565b600180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561071881610cc2565b600060208284031215610dfd57600080fd5b813563ffffffff81168114610e1157600080fd5b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610e3c57600080fd5b919050565b60008060408385031215610e5457600080fd5b610e5d83610e18565b915060208301358015158114610e7257600080fd5b809150509250929050565b600060208284031215610e8f57600080fd5b5035919050565b600060208284031215610ea857600080fd5b610e1182610e18565b600060208284031215610ec357600080fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff8416815260006020606081840152845180606085015260005b81811015610f1457868101830151858201608001528201610ef8565b81811115610f26576000608083870101525b5063ffffffff9490941660408401525050601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016016080019291505056fea164736f6c634300080f000a

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.