ETH Price: $2,868.26 (-10.44%)
Gas: 13 Gwei

Contract

0x53Fd3133bEf76DdA3ca18FB24769ebe59E28BB24
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x6101a060184451432023-10-28 0:32:23251 days ago1698453143IN
 Create: LightClient
0 ETH0.011605914.40769955

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LightClient

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 3 : LightClient.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

import {IFunctionGateway} from "succinctx/interfaces/IFunctionGateway.sol";
import {OutputReader} from "./OutputReader.sol";

contract LightClient {
    bytes32 public immutable GENESIS_VALIDATORS_ROOT;
    uint256 public immutable GENESIS_TIME;
    uint256 public immutable SECONDS_PER_SLOT;
    uint256 public immutable SLOTS_PER_PERIOD;
    uint32 public immutable SOURCE_CHAIN_ID;
    uint16 public immutable FINALITY_THRESHOLD;
    bytes32 public immutable STEP_FUNCTION_ID;
    bytes32 public immutable ROTATE_FUNCTION_ID;
    address public immutable FUNCTION_GATEWAY_ADDRESS;

    uint256 internal constant MIN_SYNC_COMMITTEE_PARTICIPANTS = 10;
    uint256 internal constant SYNC_COMMITTEE_SIZE = 512;
    uint256 internal constant FINALIZED_ROOT_INDEX = 105;
    uint256 internal constant NEXT_SYNC_COMMITTEE_INDEX = 55;
    uint256 internal constant EXECUTION_STATE_ROOT_INDEX = 402;

    /// @notice The latest slot the light client has a finalized header for.
    uint256 public head = 0;

    /// @notice Maps from a slot to a beacon block header root.
    mapping(uint256 => bytes32) public headers;

    /// @notice Maps from a slot to the timestamp of when the headers mapping was updated with slot as a key
    mapping(uint256 => uint256) public timestamps;

    /// @notice Maps from a slot to the current finalized ethereum1 execution state root.
    mapping(uint256 => bytes32) public executionStateRoots;

    /// @notice Maps from a period to the poseidon commitment for the sync committee.
    mapping(uint256 => bytes32) public syncCommitteePoseidons;

    event HeadUpdate(uint256 indexed slot, bytes32 indexed root);
    event SyncCommitteeUpdate(uint256 indexed period, bytes32 indexed root);

    error SyncCommitteeNotSet(uint256 period);
    error HeaderRootNotSet(uint256 slot);
    error SlotBehindHead(uint64 slot);
    error NotEnoughParticipation(uint16 participation);
    error SyncCommitteeAlreadySet(uint256 period);
    error HeaderRootAlreadySet(uint256 slot);
    error StateRootAlreadySet(uint256 slot);

    constructor(
        bytes32 genesisValidatorsRoot,
        uint256 genesisTime,
        uint256 secondsPerSlot,
        uint256 slotsPerPeriod,
        uint256 syncCommitteePeriod,
        bytes32 syncCommitteePoseidon,
        uint32 sourceChainId,
        uint16 finalityThreshold,
        bytes32 stepFunctionId,
        bytes32 rotateFunctionId,
        address gatewayAddress
    ) {
        GENESIS_VALIDATORS_ROOT = genesisValidatorsRoot;
        GENESIS_TIME = genesisTime;
        SECONDS_PER_SLOT = secondsPerSlot;
        SLOTS_PER_PERIOD = slotsPerPeriod;
        SOURCE_CHAIN_ID = sourceChainId;
        FINALITY_THRESHOLD = finalityThreshold;
        STEP_FUNCTION_ID = stepFunctionId;
        ROTATE_FUNCTION_ID = rotateFunctionId;
        FUNCTION_GATEWAY_ADDRESS = gatewayAddress;

        setSyncCommitteePoseidon(syncCommitteePeriod, syncCommitteePoseidon);
    }

    /// @notice Through the FunctionGateway, request for a step proof to be generated with the given attested slot number as the input.
    function requestStep(uint256 attestedSlot) external payable {
        IFunctionGateway(FUNCTION_GATEWAY_ADDRESS).requestCall{value: msg.value}(
            STEP_FUNCTION_ID,
            abi.encodePacked(
                syncCommitteePoseidons[getSyncCommitteePeriod(attestedSlot)], uint64(attestedSlot)
            ),
            address(this),
            abi.encodeWithSelector(this.step.selector, attestedSlot),
            1000000
        );
    }

    /// @notice Through the FunctionGateway, request for a rotate proof to be generated with the given finalized slot number as the input.
    function requestRotate(uint256 finalizedSlot) external payable {
        IFunctionGateway(FUNCTION_GATEWAY_ADDRESS).requestCall{value: msg.value}(
            ROTATE_FUNCTION_ID,
            abi.encodePacked(headers[finalizedSlot]),
            address(this),
            abi.encodeWithSelector(this.rotate.selector, finalizedSlot),
            1000000
        );
    }

    /// @notice Process a step proof that has been verified in the FunctionGateway, then move the head forward and store the new roots.
    function step(uint256 attestedSlot) external {
        uint256 period = getSyncCommitteePeriod(attestedSlot);
        bytes32 syncCommitteePoseidon = syncCommitteePoseidons[period];
        if (syncCommitteePoseidon == bytes32(0)) {
            revert SyncCommitteeNotSet(period);
        }

        // Input: [uint256 syncCommitteePoseidon, uint64 attestedSlot]
        // Output: [bytes32 finalizedHeaderRoot, bytes32 executionStateRoot, uint64 finalizedSlot, uint16 participation]
        bytes memory output = IFunctionGateway(FUNCTION_GATEWAY_ADDRESS).verifiedCall(
            STEP_FUNCTION_ID, abi.encodePacked(syncCommitteePoseidon, uint64(attestedSlot))
        );
        bytes32 finalizedHeaderRoot = bytes32(OutputReader.readUint256(output, 0));
        bytes32 executionStateRoot = bytes32(OutputReader.readUint256(output, 32));
        uint64 finalizedSlot = OutputReader.readUint64(output, 64);
        uint16 participation = OutputReader.readUint16(output, 72);

        if (participation < FINALITY_THRESHOLD) {
            revert NotEnoughParticipation(participation);
        }

        if (finalizedSlot <= head) {
            revert SlotBehindHead(finalizedSlot);
        }

        setSlotRoots(uint256(finalizedSlot), finalizedHeaderRoot, executionStateRoot);
    }

    /// @notice Process a rotate proof that has been verified in the FunctionGateway, then store the next sync committee poseidon.
    function rotate(uint256 finalizedSlot) external {
        bytes32 finalizedHeaderRoot = headers[finalizedSlot];
        if (finalizedHeaderRoot == bytes32(0)) {
            revert HeaderRootNotSet(finalizedSlot);
        }

        // Input: [bytes32 finalizedHeaderRoot]
        // Output: [bytes32 syncCommitteePoseidon]
        bytes memory output = IFunctionGateway(FUNCTION_GATEWAY_ADDRESS).verifiedCall(
            ROTATE_FUNCTION_ID, abi.encodePacked(finalizedHeaderRoot)
        );
        bytes32 syncCommitteePoseidon = bytes32(OutputReader.readUint256(output, 0));

        uint256 period = getSyncCommitteePeriod(finalizedSlot);
        uint256 nextPeriod = period + 1;
        setSyncCommitteePoseidon(nextPeriod, syncCommitteePoseidon);
    }

    /// @notice Gets the sync committee period from a slot.
    function getSyncCommitteePeriod(uint256 slot) internal view returns (uint256) {
        return slot / SLOTS_PER_PERIOD;
    }

    /// @notice Gets the current slot for the chain the light client is reflecting.
    function getCurrentSlot() internal view returns (uint256) {
        return (block.timestamp - GENESIS_TIME) / SECONDS_PER_SLOT;
    }

    /// @notice Sets the current slot for the chain the light client is reflecting.
    /// @dev Checks if roots exists for the slot already. If there is, check for a conflict between
    ///      the given roots and the existing roots. If there is an existing header but no
    ///      conflict, do nothing. This avoids timestamp renewal DoS attacks.
    function setSlotRoots(uint256 slot, bytes32 finalizedHeaderRoot, bytes32 executionStateRoot)
        internal
    {
        if (headers[slot] != bytes32(0)) {
            revert HeaderRootAlreadySet(slot);
        }
        if (executionStateRoots[slot] != bytes32(0)) {
            revert StateRootAlreadySet(slot);
        }
        head = slot;
        headers[slot] = finalizedHeaderRoot;
        executionStateRoots[slot] = executionStateRoot;
        timestamps[slot] = block.timestamp;
        emit HeadUpdate(slot, finalizedHeaderRoot);
    }

    /// @notice Sets the sync committee poseidon for a given period.
    function setSyncCommitteePoseidon(uint256 period, bytes32 poseidon) internal {
        if (syncCommitteePoseidons[period] != bytes32(0)) {
            revert SyncCommitteeAlreadySet(period);
        }
        syncCommitteePoseidons[period] = poseidon;
        emit SyncCommitteeUpdate(period, poseidon);
    }
}

File 2 of 3 : IFunctionGateway.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

interface IFunctionGatewayEvents {
    event RequestCallback(
        uint32 indexed nonce,
        bytes32 indexed functionId,
        bytes input,
        bytes context,
        address callbackAddress,
        bytes4 callbackSelector,
        uint32 callbackGasLimit,
        uint256 feeAmount
    );
    event RequestCall(
        bytes32 indexed functionId,
        bytes input,
        address entryAddress,
        bytes entryCalldata,
        uint32 entryGasLimit,
        address sender,
        uint256 feeAmount
    );
    event RequestFulfilled(
        uint32 indexed nonce, bytes32 indexed functionId, bytes32 inputHash, bytes32 outputHash
    );
    event Call(bytes32 indexed functionId, bytes32 inputHash, bytes32 outputHash);
}

interface IFunctionGatewayErrors {
    error InvalidRequest(uint32 nonce, bytes32 expectedRequestHash, bytes32 requestHash);
    error CallbackFailed(bytes4 callbackSelector, bytes output, bytes context);
    error InvalidCall(bytes32 functionId, bytes input);
    error CallFailed(address callbackAddress, bytes callbackData);
    error InvalidProof(address verifier, bytes32 inputHash, bytes32 outputHash, bytes proof);
}

interface IFunctionGateway is IFunctionGatewayEvents, IFunctionGatewayErrors {
    function requestCallback(
        bytes32 _functionId,
        bytes memory _input,
        bytes memory _context,
        bytes4 _callbackSelector,
        uint32 _callbackGasLimit
    ) external payable returns (bytes32);

    function requestCall(
        bytes32 _functionId,
        bytes memory _input,
        address _entryAddress,
        bytes memory _entryData,
        uint32 _entryGasLimit
    ) external payable;

    function verifiedCall(bytes32 _functionId, bytes memory _input)
        external
        view
        returns (bytes memory);
}

File 3 of 3 : OutputReader.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;

library OutputReader {
    function readUint256(bytes memory _output, uint256 _offset) internal pure returns (uint256) {
        uint256 value;
        assembly {
            value := mload(add(add(_output, 0x20), _offset))
        }
        return value;
    }

    function readUint128(bytes memory _output, uint256 _offset) internal pure returns (uint128) {
        uint128 value;
        assembly {
            value := mload(add(add(_output, 0x10), _offset))
        }
        return value;
    }

    function readUint64(bytes memory _output, uint256 _offset) internal pure returns (uint64) {
        uint64 value;
        assembly {
            value := mload(add(add(_output, 0x08), _offset))
        }
        return value;
    }

    function readUint32(bytes memory _output, uint256 _offset) internal pure returns (uint32) {
        uint32 value;
        assembly {
            value := mload(add(add(_output, 0x04), _offset))
        }
        return value;
    }

    function readUint16(bytes memory _output, uint256 _offset) internal pure returns (uint16) {
        uint16 value;
        assembly {
            value := mload(add(add(_output, 0x02), _offset))
        }
        return value;
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/succinctx/contracts/lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts-upgradeable/=lib/succinctx/contracts/lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/succinctx/contracts/lib/openzeppelin-contracts/",
    "safe-contracts/=lib/succinctx/contracts/lib/safe-contracts/",
    "succinctx/=lib/succinctx/contracts/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bytes32","name":"genesisValidatorsRoot","type":"bytes32"},{"internalType":"uint256","name":"genesisTime","type":"uint256"},{"internalType":"uint256","name":"secondsPerSlot","type":"uint256"},{"internalType":"uint256","name":"slotsPerPeriod","type":"uint256"},{"internalType":"uint256","name":"syncCommitteePeriod","type":"uint256"},{"internalType":"bytes32","name":"syncCommitteePoseidon","type":"bytes32"},{"internalType":"uint32","name":"sourceChainId","type":"uint32"},{"internalType":"uint16","name":"finalityThreshold","type":"uint16"},{"internalType":"bytes32","name":"stepFunctionId","type":"bytes32"},{"internalType":"bytes32","name":"rotateFunctionId","type":"bytes32"},{"internalType":"address","name":"gatewayAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"slot","type":"uint256"}],"name":"HeaderRootAlreadySet","type":"error"},{"inputs":[{"internalType":"uint256","name":"slot","type":"uint256"}],"name":"HeaderRootNotSet","type":"error"},{"inputs":[{"internalType":"uint16","name":"participation","type":"uint16"}],"name":"NotEnoughParticipation","type":"error"},{"inputs":[{"internalType":"uint64","name":"slot","type":"uint64"}],"name":"SlotBehindHead","type":"error"},{"inputs":[{"internalType":"uint256","name":"slot","type":"uint256"}],"name":"StateRootAlreadySet","type":"error"},{"inputs":[{"internalType":"uint256","name":"period","type":"uint256"}],"name":"SyncCommitteeAlreadySet","type":"error"},{"inputs":[{"internalType":"uint256","name":"period","type":"uint256"}],"name":"SyncCommitteeNotSet","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"slot","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"HeadUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"period","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"SyncCommitteeUpdate","type":"event"},{"inputs":[],"name":"FINALITY_THRESHOLD","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FUNCTION_GATEWAY_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GENESIS_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GENESIS_VALIDATORS_ROOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROTATE_FUNCTION_ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECONDS_PER_SLOT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SLOTS_PER_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SOURCE_CHAIN_ID","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STEP_FUNCTION_ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"executionStateRoots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"head","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"headers","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"finalizedSlot","type":"uint256"}],"name":"requestRotate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"attestedSlot","type":"uint256"}],"name":"requestStep","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"finalizedSlot","type":"uint256"}],"name":"rotate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"attestedSlot","type":"uint256"}],"name":"step","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"syncCommitteePoseidons","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"timestamps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6101a06040526000805534801561001557600080fd5b50604051610f83380380610f838339810160408190526100349161011f565b60808b905260a08a905260c089905260e088905263ffffffff85166101005261ffff8416610120526101408390526101608290526001600160a01b038116610180526100808787610090565b50505050505050505050506101c9565b600082815260046020526040902054156100c457604051630dbcb16560e41b81526004810183905260240160405180910390fd5b60008281526004602052604080822083905551829184917f783ee45e8820a8249b1456ff4a715f3bd483b1a59bdc7a49bbc316bbd67a4e2f9190a35050565b80516001600160a01b038116811461011a57600080fd5b919050565b60008060008060008060008060008060006101608c8e03121561014157600080fd5b8b519a5060208c0151995060408c0151985060608c0151975060808c0151965060a08c0151955060c08c015163ffffffff8116811461017f57600080fd5b60e08d015190955061ffff8116811461019757600080fd5b6101008d01516101208e0151919550935091506101b76101408d01610103565b90509295989b509295989b9093969950565b60805160a05160c05160e0516101005161012051610140516101605161018051610d0461027f600039600081816103e6015281816104a0015281816105f3015281816107ae01526108e80152600081816101dd015281816104cf015261091801526000818161036b0152818161062201526107de01526000818161039f015261070c01526000610251015260008181610120015261099d01526000610167015260006104450152600061030a0152610d046000f3fe6080604052600436106101095760003560e01c80638bc33af311610095578063c0dc9bc711610064578063c0dc9bc714610359578063da4b05e71461038d578063e4dd2374146103d4578063ed2ea97d14610420578063f28824611461043357600080fd5b80638bc33af3146102b55780638f7dcfa3146102e2578063a8769acb146102f8578063b34711ab1461032c57600080fd5b80634df38609116100dc5780634df38609146101cb57806356f90d79146101ff578063702ed6681461022c57806374be21501461023f5780637623ee291461028857600080fd5b80632073ee701461010e578063304b9071146101555780633852f4b0146101895780633a1cde75146101ab575b600080fd5b34801561011a57600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561016157600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000081565b34801561019557600080fd5b506101a96101a4366004610aeb565b610467565b005b3480156101b757600080fd5b506101a96101c6366004610aeb565b6105b1565b3480156101d757600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000081565b34801561020b57600080fd5b5061014261021a366004610aeb565b60016020526000908152604090205481565b6101a961023a366004610aeb565b6107ac565b34801561024b57600080fd5b506102737f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff909116815260200161014c565b34801561029457600080fd5b506101426102a3366004610aeb565b60036020526000908152604090205481565b3480156102c157600080fd5b506101426102d0366004610aeb565b60026020526000908152604090205481565b3480156102ee57600080fd5b5061014260005481565b34801561030457600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000081565b34801561033857600080fd5b50610142610347366004610aeb565b60046020526000908152604090205481565b34801561036557600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000081565b34801561039957600080fd5b506103c17f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff909116815260200161014c565b3480156103e057600080fd5b506104087f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161014c565b6101a961042e366004610aeb565b6108e6565b34801561043f57600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000081565b6000818152600160205260409020548061049c5760405163685a1fd160e11b8152600481018390526024015b60405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663176e62fd7f00000000000000000000000000000000000000000000000000000000000000008460405160200161050191815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b815260040161052d929190610b54565b600060405180830381865afa15801561054a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105729190810190610b8b565b90506000610581826000610988565b9050600061058e85610996565b9050600061059d826001610c38565b90506105a981846109c2565b505050505050565b60006105bc82610996565b600081815260046020526040902054909150806105ef57604051632dd18ba960e11b815260048101839052602401610493565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663176e62fd7f0000000000000000000000000000000000000000000000000000000000000000848760405160200161066a92919091825260c01b6001600160c01b031916602082015260280190565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610696929190610b54565b600060405180830381865afa1580156106b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106db9190810190610b8b565b905060006106ea826000610988565b905060006106f9836020610988565b6048840151604a8501519192509061ffff7f00000000000000000000000000000000000000000000000000000000000000008116908216101561075557604051633d3f221160e01b815261ffff82166004820152602401610493565b6000548267ffffffffffffffff161161078d576040516379cd301b60e01b815267ffffffffffffffff83166004820152602401610493565b6107a28267ffffffffffffffff168585610a31565b5050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663436a61d5347f00000000000000000000000000000000000000000000000000000000000000006004600061080a87610996565b8152602001908152602001600020548560405160200161084192919091825260c01b6001600160c01b031916602082015260280190565b60405160208183030381529060405230633a1cde7560e01b8760405160240161086c91815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199485161790525160e088901b90921682526108b994939291620f424090600401610c59565b6000604051808303818588803b1580156108d257600080fd5b505af11580156105a9573d6000803e3d6000fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663436a61d5347f0000000000000000000000000000000000000000000000000000000000000000600160008681526020019081526020016000205460405160200161095d91815260200190565b60405160208183030381529060405230633852f4b060e01b8760405160240161086c91815260200190565b818101602001515b92915050565b60006109907f000000000000000000000000000000000000000000000000000000000000000083610cac565b600082815260046020526040902054156109f257604051630dbcb16560e41b815260048101839052602401610493565b60008281526004602052604080822083905551829184917f783ee45e8820a8249b1456ff4a715f3bd483b1a59bdc7a49bbc316bbd67a4e2f9190a35050565b60008381526001602052604090205415610a6157604051631b25d51d60e31b815260048101849052602401610493565b60008381526003602052604090205415610a915760405163128fe76160e01b815260048101849052602401610493565b600083815583815260016020908152604080832085905560038252808320849055600290915280822042905551839185917ffefccbcf6acd2cac524c1cb2d70450cabbec5bc95873e927c121d2d9b7924a029190a3505050565b600060208284031215610afd57600080fd5b5035919050565b60005b83811015610b1f578181015183820152602001610b07565b50506000910152565b60008151808452610b40816020860160208601610b04565b601f01601f19169290920160200192915050565b828152604060208201526000610b6d6040830184610b28565b949350505050565b634e487b7160e01b600052604160045260246000fd5b600060208284031215610b9d57600080fd5b815167ffffffffffffffff80821115610bb557600080fd5b818401915084601f830112610bc957600080fd5b815181811115610bdb57610bdb610b75565b604051601f8201601f19908116603f01168101908382118183101715610c0357610c03610b75565b81604052828152876020848701011115610c1c57600080fd5b610c2d836020830160208801610b04565b979650505050505050565b8082018082111561099057634e487b7160e01b600052601160045260246000fd5b85815260a060208201526000610c7260a0830187610b28565b6001600160a01b03861660408401528281036060840152610c938186610b28565b91505063ffffffff831660808301529695505050505050565b600082610cc957634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122006e5ffdcdf0919554f1b5e4987cf92bf8534cbe09d2dabf7998d90841994b97864736f6c634300081200334b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95000000000000000000000000000000000000000000000000000000005fc63057000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003a30ab2afdc05c8b6ae1f2ab20874fb4159e25d5c1d4faa41aee232d6ab331332df00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000156af44af6890508b3b7f6910d4a4570a0d524769a23ce340b2c7400e140ad168ab9aed23f9e6e8f8b98751cf508069b5b7f015d4d510b6a4820d41ba1ce88190d90000000000000000000000006e4f1e9ea315ebfd69d18c2db974eef6105fb803

Deployed Bytecode

0x6080604052600436106101095760003560e01c80638bc33af311610095578063c0dc9bc711610064578063c0dc9bc714610359578063da4b05e71461038d578063e4dd2374146103d4578063ed2ea97d14610420578063f28824611461043357600080fd5b80638bc33af3146102b55780638f7dcfa3146102e2578063a8769acb146102f8578063b34711ab1461032c57600080fd5b80634df38609116100dc5780634df38609146101cb57806356f90d79146101ff578063702ed6681461022c57806374be21501461023f5780637623ee291461028857600080fd5b80632073ee701461010e578063304b9071146101555780633852f4b0146101895780633a1cde75146101ab575b600080fd5b34801561011a57600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000200081565b6040519081526020015b60405180910390f35b34801561016157600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000c81565b34801561019557600080fd5b506101a96101a4366004610aeb565b610467565b005b3480156101b757600080fd5b506101a96101c6366004610aeb565b6105b1565b3480156101d757600080fd5b506101427f9aed23f9e6e8f8b98751cf508069b5b7f015d4d510b6a4820d41ba1ce88190d981565b34801561020b57600080fd5b5061014261021a366004610aeb565b60016020526000908152604090205481565b6101a961023a366004610aeb565b6107ac565b34801561024b57600080fd5b506102737f000000000000000000000000000000000000000000000000000000000000000181565b60405163ffffffff909116815260200161014c565b34801561029457600080fd5b506101426102a3366004610aeb565b60036020526000908152604090205481565b3480156102c157600080fd5b506101426102d0366004610aeb565b60026020526000908152604090205481565b3480156102ee57600080fd5b5061014260005481565b34801561030457600080fd5b506101427f4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe9581565b34801561033857600080fd5b50610142610347366004610aeb565b60046020526000908152604090205481565b34801561036557600080fd5b506101427faf44af6890508b3b7f6910d4a4570a0d524769a23ce340b2c7400e140ad168ab81565b34801561039957600080fd5b506103c17f000000000000000000000000000000000000000000000000000000000000015681565b60405161ffff909116815260200161014c565b3480156103e057600080fd5b506104087f0000000000000000000000006e4f1e9ea315ebfd69d18c2db974eef6105fb80381565b6040516001600160a01b03909116815260200161014c565b6101a961042e366004610aeb565b6108e6565b34801561043f57600080fd5b506101427f000000000000000000000000000000000000000000000000000000005fc6305781565b6000818152600160205260409020548061049c5760405163685a1fd160e11b8152600481018390526024015b60405180910390fd5b60007f0000000000000000000000006e4f1e9ea315ebfd69d18c2db974eef6105fb8036001600160a01b031663176e62fd7f9aed23f9e6e8f8b98751cf508069b5b7f015d4d510b6a4820d41ba1ce88190d98460405160200161050191815260200190565b6040516020818303038152906040526040518363ffffffff1660e01b815260040161052d929190610b54565b600060405180830381865afa15801561054a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105729190810190610b8b565b90506000610581826000610988565b9050600061058e85610996565b9050600061059d826001610c38565b90506105a981846109c2565b505050505050565b60006105bc82610996565b600081815260046020526040902054909150806105ef57604051632dd18ba960e11b815260048101839052602401610493565b60007f0000000000000000000000006e4f1e9ea315ebfd69d18c2db974eef6105fb8036001600160a01b031663176e62fd7faf44af6890508b3b7f6910d4a4570a0d524769a23ce340b2c7400e140ad168ab848760405160200161066a92919091825260c01b6001600160c01b031916602082015260280190565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610696929190610b54565b600060405180830381865afa1580156106b3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106db9190810190610b8b565b905060006106ea826000610988565b905060006106f9836020610988565b6048840151604a8501519192509061ffff7f00000000000000000000000000000000000000000000000000000000000001568116908216101561075557604051633d3f221160e01b815261ffff82166004820152602401610493565b6000548267ffffffffffffffff161161078d576040516379cd301b60e01b815267ffffffffffffffff83166004820152602401610493565b6107a28267ffffffffffffffff168585610a31565b5050505050505050565b7f0000000000000000000000006e4f1e9ea315ebfd69d18c2db974eef6105fb8036001600160a01b031663436a61d5347faf44af6890508b3b7f6910d4a4570a0d524769a23ce340b2c7400e140ad168ab6004600061080a87610996565b8152602001908152602001600020548560405160200161084192919091825260c01b6001600160c01b031916602082015260280190565b60405160208183030381529060405230633a1cde7560e01b8760405160240161086c91815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199485161790525160e088901b90921682526108b994939291620f424090600401610c59565b6000604051808303818588803b1580156108d257600080fd5b505af11580156105a9573d6000803e3d6000fd5b7f0000000000000000000000006e4f1e9ea315ebfd69d18c2db974eef6105fb8036001600160a01b031663436a61d5347f9aed23f9e6e8f8b98751cf508069b5b7f015d4d510b6a4820d41ba1ce88190d9600160008681526020019081526020016000205460405160200161095d91815260200190565b60405160208183030381529060405230633852f4b060e01b8760405160240161086c91815260200190565b818101602001515b92915050565b60006109907f000000000000000000000000000000000000000000000000000000000000200083610cac565b600082815260046020526040902054156109f257604051630dbcb16560e41b815260048101839052602401610493565b60008281526004602052604080822083905551829184917f783ee45e8820a8249b1456ff4a715f3bd483b1a59bdc7a49bbc316bbd67a4e2f9190a35050565b60008381526001602052604090205415610a6157604051631b25d51d60e31b815260048101849052602401610493565b60008381526003602052604090205415610a915760405163128fe76160e01b815260048101849052602401610493565b600083815583815260016020908152604080832085905560038252808320849055600290915280822042905551839185917ffefccbcf6acd2cac524c1cb2d70450cabbec5bc95873e927c121d2d9b7924a029190a3505050565b600060208284031215610afd57600080fd5b5035919050565b60005b83811015610b1f578181015183820152602001610b07565b50506000910152565b60008151808452610b40816020860160208601610b04565b601f01601f19169290920160200192915050565b828152604060208201526000610b6d6040830184610b28565b949350505050565b634e487b7160e01b600052604160045260246000fd5b600060208284031215610b9d57600080fd5b815167ffffffffffffffff80821115610bb557600080fd5b818401915084601f830112610bc957600080fd5b815181811115610bdb57610bdb610b75565b604051601f8201601f19908116603f01168101908382118183101715610c0357610c03610b75565b81604052828152876020848701011115610c1c57600080fd5b610c2d836020830160208801610b04565b979650505050505050565b8082018082111561099057634e487b7160e01b600052601160045260246000fd5b85815260a060208201526000610c7260a0830187610b28565b6001600160a01b03861660408401528281036060840152610c938186610b28565b91505063ffffffff831660808301529695505050505050565b600082610cc957634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122006e5ffdcdf0919554f1b5e4987cf92bf8534cbe09d2dabf7998d90841994b97864736f6c63430008120033

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

4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95000000000000000000000000000000000000000000000000000000005fc63057000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003a30ab2afdc05c8b6ae1f2ab20874fb4159e25d5c1d4faa41aee232d6ab331332df00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000156af44af6890508b3b7f6910d4a4570a0d524769a23ce340b2c7400e140ad168ab9aed23f9e6e8f8b98751cf508069b5b7f015d4d510b6a4820d41ba1ce88190d90000000000000000000000006e4f1e9ea315ebfd69d18c2db974eef6105fb803

-----Decoded View---------------
Arg [0] : genesisValidatorsRoot (bytes32): 0x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95
Arg [1] : genesisTime (uint256): 1606824023
Arg [2] : secondsPerSlot (uint256): 12
Arg [3] : slotsPerPeriod (uint256): 8192
Arg [4] : syncCommitteePeriod (uint256): 931
Arg [5] : syncCommitteePoseidon (bytes32): 0x0ab2afdc05c8b6ae1f2ab20874fb4159e25d5c1d4faa41aee232d6ab331332df
Arg [6] : sourceChainId (uint32): 1
Arg [7] : finalityThreshold (uint16): 342
Arg [8] : stepFunctionId (bytes32): 0xaf44af6890508b3b7f6910d4a4570a0d524769a23ce340b2c7400e140ad168ab
Arg [9] : rotateFunctionId (bytes32): 0x9aed23f9e6e8f8b98751cf508069b5b7f015d4d510b6a4820d41ba1ce88190d9
Arg [10] : gatewayAddress (address): 0x6e4f1e9eA315EBFd69d18C2DB974EEf6105FB803

-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95
Arg [1] : 000000000000000000000000000000000000000000000000000000005fc63057
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [3] : 0000000000000000000000000000000000000000000000000000000000002000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000003a3
Arg [5] : 0ab2afdc05c8b6ae1f2ab20874fb4159e25d5c1d4faa41aee232d6ab331332df
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000156
Arg [8] : af44af6890508b3b7f6910d4a4570a0d524769a23ce340b2c7400e140ad168ab
Arg [9] : 9aed23f9e6e8f8b98751cf508069b5b7f015d4d510b6a4820d41ba1ce88190d9
Arg [10] : 0000000000000000000000006e4f1e9ea315ebfd69d18c2db974eef6105fb803


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.