ETH Price: $3,065.27 (+0.92%)
Gas: 4 Gwei

Contract

0x0A389feeaeA0DFf7EC05F269de31147B4934452F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Bridge Zk Link B...179611692023-08-21 5:58:47323 days ago1692597527IN
0x0A389fee...B4934452F
0.00112541 ETH0.0033515613.59060054
Bridge Zk Link B...178842092023-08-10 11:32:47334 days ago1691667167IN
0x0A389fee...B4934452F
0.00108036 ETH0.0057197723.19371446
Bridge Zk Link B...178839762023-08-10 10:45:59334 days ago1691664359IN
0x0A389fee...B4934452F
0.00108036 ETH0.0039327915.94905753
Bridge Zk Link B...178829042023-08-10 7:08:35334 days ago1691651315IN
0x0A389fee...B4934452F
0.00101617 ETH0.0034681614.06340826
Bridge Zk Link B...178823472023-08-10 5:16:11334 days ago1691644571IN
0x0A389fee...B4934452F
0.00101617 ETH0.003794515.38597341
Bridge Zk Link B...178821102023-08-10 4:28:47334 days ago1691641727IN
0x0A389fee...B4934452F
0.00101617 ETH0.0032254313.07849837
Bridge Zk Link B...178785582023-08-09 16:32:23334 days ago1691598743IN
0x0A389fee...B4934452F
0.00101617 ETH0.0093165333.17746782
0x60803461178755192023-08-09 6:20:23335 days ago1691562023IN
 Create: LayerZeroBridge
0 ETH0.0194919413.41446685

Latest 21 internal transactions

Advanced mode:
Parent Transaction Hash Block From To Value
179611692023-08-21 5:58:47323 days ago1692597527
0x0A389fee...B4934452F
0.0005627 ETH
179611692023-08-21 5:58:47323 days ago1692597527
0x0A389fee...B4934452F
0.0005627 ETH
179611692023-08-21 5:58:47323 days ago1692597527
0x0A389fee...B4934452F
0.00112541 ETH
178842092023-08-10 11:32:47334 days ago1691667167
0x0A389fee...B4934452F
0.00054018 ETH
178842092023-08-10 11:32:47334 days ago1691667167
0x0A389fee...B4934452F
0.00054018 ETH
178842092023-08-10 11:32:47334 days ago1691667167
0x0A389fee...B4934452F
0.00108036 ETH
178839762023-08-10 10:45:59334 days ago1691664359
0x0A389fee...B4934452F
0.00054018 ETH
178839762023-08-10 10:45:59334 days ago1691664359
0x0A389fee...B4934452F
0.00054018 ETH
178839762023-08-10 10:45:59334 days ago1691664359
0x0A389fee...B4934452F
0.00108036 ETH
178829042023-08-10 7:08:35334 days ago1691651315
0x0A389fee...B4934452F
0.00050808 ETH
178829042023-08-10 7:08:35334 days ago1691651315
0x0A389fee...B4934452F
0.00050808 ETH
178829042023-08-10 7:08:35334 days ago1691651315
0x0A389fee...B4934452F
0.00101617 ETH
178823472023-08-10 5:16:11334 days ago1691644571
0x0A389fee...B4934452F
0.00050808 ETH
178823472023-08-10 5:16:11334 days ago1691644571
0x0A389fee...B4934452F
0.00050808 ETH
178823472023-08-10 5:16:11334 days ago1691644571
0x0A389fee...B4934452F
0.00101617 ETH
178821102023-08-10 4:28:47334 days ago1691641727
0x0A389fee...B4934452F
0.00050808 ETH
178821102023-08-10 4:28:47334 days ago1691641727
0x0A389fee...B4934452F
0.00050808 ETH
178821102023-08-10 4:28:47334 days ago1691641727
0x0A389fee...B4934452F
0.00101617 ETH
178785582023-08-09 16:32:23334 days ago1691598743
0x0A389fee...B4934452F
0.00050808 ETH
178785582023-08-09 16:32:23334 days ago1691598743
0x0A389fee...B4934452F
0.00050808 ETH
178785582023-08-09 16:32:23334 days ago1691598743
0x0A389fee...B4934452F
0.00101617 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LayerZeroBridge

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 7 : LayerZeroBridge.sol
pragma solidity ^0.8.0;

// SPDX-License-Identifier: MIT



import "./ILayerZeroReceiver.sol";
import "./ILayerZeroEndpoint.sol";
import "./ILayerZeroUserApplicationConfig.sol";
import "./LayerZeroStorage.sol";
import "../zksync/ReentrancyGuard.sol";

/// @title LayerZero bridge implementation of non-blocking model
/// @dev if message is blocking we should call `retryPayload` of endpoint to retry
/// the reasons for message blocking may be:
/// * `_dstAddress` is not deployed to dst chain, and we can deploy LayerZeroBridge to dst chain to fix it.
/// * lzReceive cost more gas than `_gasLimit` that endpoint send, and user should call `retryMessage` to fix it.
/// * lzReceive reverted unexpected, and we can fix bug and deploy a new contract to fix it.
/// @author zk.link
contract LayerZeroBridge is ReentrancyGuard, LayerZeroStorage, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {

    // to avoid stack too deep
    struct LzBridgeParams {
        uint16 dstChainId; // the destination chainId
        address payable refundAddress; // native fees refund address if msg.value is too large
        address zroPaymentAddress; // if not zero user will use ZRO token to pay layerzero protocol fees(not oracle or relayer fees)
        bytes adapterParams; // see https://layerzero.gitbook.io/docs/guides/advanced/relayer-adapter-parameters
    }

    modifier onlyEndpoint {
        require(msg.sender == address(endpoint), "Require endpoint");
        _;
    }

    modifier onlyGovernor {
        require(msg.sender == zklink.networkGovernor(), "Caller is not governor");
        _;
    }

    receive() external payable {
        // receive the refund eth from layerzero endpoint when send msg
    }

    /// @param _zklink The zklink contract address
    /// @param _endpoint The LayerZero endpoint
    constructor(IZkLink _zklink, ILayerZeroEndpoint _endpoint) {
        initializeReentrancyGuard();

        zklink = _zklink;
        endpoint = _endpoint;
    }

    //---------------------------UserApplication config----------------------------------------
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyGovernor {
        endpoint.setConfig(_version, _chainId, _configType, _config);
    }

    function setSendVersion(uint16 _version) external override onlyGovernor {
        endpoint.setSendVersion(_version);
    }

    function setReceiveVersion(uint16 _version) external override onlyGovernor {
        endpoint.setReceiveVersion(_version);
    }

    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyGovernor {
        endpoint.forceResumeReceive(_srcChainId, _srcAddress);
    }

    /// @notice Set bridge destination
    /// @param dstChainId LayerZero chain id on other chains
    /// @param contractAddr LayerZeroBridge contract address on other chains
    function setDestination(uint16 dstChainId, bytes calldata contractAddr) external onlyGovernor {
        require(dstChainId != endpoint.getChainId(), "Invalid dstChainId");
        destinations[dstChainId] = contractAddr;
        emit UpdateDestination(dstChainId, contractAddr);
    }

    /// @notice Estimate bridge ZkLink Block fees
    /// @param lzChainId the destination chainId
    /// @param syncHash the sync hash of stored block
    /// @param progress the sync progress
    /// @param useZro if true user will use ZRO token to pay layerzero protocol fees(not oracle or relayer fees)
    /// @param adapterParams see https://layerzero.gitbook.io/docs/guides/advanced/relayer-adapter-parameters
    function estimateZkLinkBlockBridgeFees(
        uint16 lzChainId,
        bytes32 syncHash,
        uint256 progress,
        bool useZro,
        bytes calldata adapterParams
    ) external view returns (uint nativeFee, uint zroFee) {
        bytes memory payload = buildZkLinkBlockBridgePayload(syncHash, progress);
        return endpoint.estimateFees(lzChainId, address(this), payload, useZro, adapterParams);
    }

    /// @notice Bridge ZkLink block to other chain
    /// @param storedBlockInfo the block proved but not executed at the current chain
    /// @param dstChainIds dst chains to bridge, empty array will be reverted
    /// @param refundAddress native fees refund address if msg.value is too large
    /// @param zroPaymentAddress if not zero user will use ZRO token to pay layerzero protocol fees(not oracle or relayer fees)
    /// @param adapterParams see https://layerzero.gitbook.io/docs/guides/advanced/relayer-adapter-parameters
    function bridgeZkLinkBlock(
        IZkLink.StoredBlockInfo calldata storedBlockInfo,
        uint16[] memory dstChainIds,
        address payable refundAddress,
        address zroPaymentAddress,
        bytes memory adapterParams
    ) external nonReentrant payable {
        // ===Checks===
        require(dstChainIds.length > 0, "No dst chain");

        // ===Interactions===
        bytes32 syncHash = storedBlockInfo.syncHash;
        uint256 progress = zklink.getSynchronizedProgress(storedBlockInfo);

        uint256 originMsgValue = msg.value;
        uint256 originBalance = address(this).balance - originMsgValue; // underflow is impossible
        // before refund, we send all balance of this contract and set refund address to this contract
        for (uint i = 0; i < dstChainIds.length; ++i) { // overflow is impossible
            _bridgeZkLinkBlockProgress(syncHash, progress, dstChainIds[i], payable(address(this)), zroPaymentAddress, adapterParams, address(this).balance);
        }
        // left value should be greater equal than originBalance and refund left value to `refundAddress`
        require(address(this).balance >= originBalance, "Msg value is not enough for bridge");
        uint256 leftMsgValue = address(this).balance - originBalance;  // underflow is impossible
        if (leftMsgValue > 0) {
            // solhint-disable-next-line  avoid-low-level-calls
            (bool success, ) = refundAddress.call{value: leftMsgValue}("");
            require(success, "Refund failed");
        }
        // log the fee payed to layerzero
        emit SynchronizationFee(originMsgValue - leftMsgValue);
    }

    function _bridgeZkLinkBlockProgress(
        bytes32 syncHash,
        uint256 progress,
        uint16 dstChainId,
        address payable refundAddress,
        address zroPaymentAddress,
        bytes memory adapterParams,
        uint256 bridgeFee
    ) internal {
        // ===Checks===
        bytes memory trustedRemote = checkDstChainId(dstChainId);

        // endpoint will check `refundAddress`, `zroPaymentAddress` and `adapterParams`

        // ===Effects===
        uint64 nonce = endpoint.getOutboundNonce(dstChainId, address(this));
        emit SendSynchronizationProgress(dstChainId, nonce + 1, syncHash, progress);

        // ===Interactions===
        // send LayerZero message
        bytes memory path = abi.encodePacked(trustedRemote, address(this));
        bytes memory payload = buildZkLinkBlockBridgePayload(syncHash, progress);
        // solhint-disable-next-line check-send-result
        endpoint.send{value:bridgeFee}(dstChainId, path, payload, refundAddress, zroPaymentAddress, adapterParams);
    }

    /// @notice Receive the bytes payload from the source chain via LayerZero
    /// @dev lzReceive can only be called by endpoint
    /// @dev srcPath(in UltraLightNodeV2) = abi.encodePacked(srcAddress, dstAddress);
    function lzReceive(uint16 srcChainId, bytes calldata srcPath, uint64 nonce, bytes calldata payload) external override onlyEndpoint nonReentrant {
        // reject invalid src contract address
        bytes memory srcAddress = destinations[srcChainId];
        bytes memory path = abi.encodePacked(srcAddress, address(this));
        require(keccak256(path) == keccak256(srcPath), "Invalid src");

        // try-catch all errors/exceptions
        // solhint-disable-next-line no-empty-blocks
        try this.nonblockingLzReceive(srcChainId, srcAddress, nonce, payload) {
            // do nothing
        } catch {
            // error / exception
            failedMessages[srcChainId][srcAddress][nonce] = keccak256(payload);
            emit MessageFailed(srcChainId, srcAddress, nonce, payload);
        }
    }

    function nonblockingLzReceive(uint16 srcChainId, bytes calldata srcAddress, uint64 nonce, bytes calldata payload) public {
        // only internal transaction
        require(msg.sender == address(this), "Caller must be this bridge");
        _nonblockingLzReceive(srcChainId, srcAddress, nonce, payload);
    }

    /// @notice Retry the failed message, payload hash must be exist
    function retryMessage(uint16 srcChainId, bytes calldata srcAddress, uint64 nonce, bytes calldata payload) external payable virtual nonReentrant {
        // assert there is message to retry
        bytes32 payloadHash = failedMessages[srcChainId][srcAddress][nonce];
        require(payloadHash != bytes32(0), "No stored message");
        require(keccak256(payload) == payloadHash, "Invalid payload");
        // clear the stored message
        failedMessages[srcChainId][srcAddress][nonce] = bytes32(0);
        // execute the message. revert if it fails again
        _nonblockingLzReceive(srcChainId, srcAddress, nonce, payload);
    }

    function _nonblockingLzReceive(uint16 srcChainId, bytes calldata /**srcAddress**/, uint64 nonce, bytes calldata payload) internal {
        // unpack payload
        (bytes32 syncHash, uint256 progress) = abi.decode(payload, (bytes32, uint256));
        emit ReceiveSynchronizationProgress(srcChainId, nonce, syncHash, progress);
        zklink.receiveSynchronizationProgress(syncHash, progress);
    }

    function checkDstChainId(uint16 dstChainId) internal view returns (bytes memory trustedRemote) {
        trustedRemote = destinations[dstChainId];
        require(trustedRemote.length > 0, "Trust remote not exist");
    }

    function buildZkLinkBlockBridgePayload(bytes32 syncHash, uint256 progress) internal pure returns (bytes memory payload) {
        payload = abi.encode(syncHash, progress);
    }
}

File 2 of 7 : ILayerZeroEndpoint.sol
pragma solidity ^0.8.0;

// SPDX-License-Identifier: MIT



import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;

    // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(address _userApplication) external view returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(address _userApplication) external view returns (uint16);
}

File 3 of 7 : ILayerZeroReceiver.sol
pragma solidity ^0.8.0;

// SPDX-License-Identifier: MIT



interface ILayerZeroReceiver {
    // @notice LayerZero endpoint will invoke this function to deliver the message on the destination
    // @param _srcChainId - the source endpoint identifier
    // @param _srcAddress - the source sending contract address from the source chain
    // @param _nonce - the ordered message nonce
    // @param _payload - the signed payload is the UA bytes has encoded to be sent
    function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;
}

File 4 of 7 : ILayerZeroUserApplicationConfig.sol
pragma solidity ^0.8.0;

// SPDX-License-Identifier: MIT



interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}

File 5 of 7 : LayerZeroStorage.sol
pragma solidity ^0.8.0;

// SPDX-License-Identifier: MIT



import "./ILayerZeroEndpoint.sol";
import "../interfaces/IZkLink.sol";

/// @title LayerZero bridge storage
/// @author zk.link
/// @dev Do not initialize any variables of this contract
/// Do not break the alignment of contract storage
contract LayerZeroStorage {
    /// @notice zklink contract address
    IZkLink public zklink;
    /// @notice LayerZero endpoint that used to send and receive message
    ILayerZeroEndpoint public endpoint;
    /// @notice bridge contract address on other chains
    mapping(uint16 => bytes) public destinations;
    /// @notice failed message of lz non-blocking model
    /// @dev the struct of failedMessages is (srcChainId => srcAddress => nonce => payloadHash)
    /// srcChainId is the id of message source chain
    /// srcAddress is the trust remote address on the source chain who send message
    /// nonce is inbound message nonce
    /// payLoadHash is the keccak256 of message payload
    mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;

    event UpdateDestination(uint16 indexed lzChainId, bytes destination);
    event MessageFailed(uint16 indexed srcChainId, bytes srcAddress, uint64 nonce, bytes payload);
    event SendSynchronizationProgress(uint16 indexed dstChainId, uint64 nonce, bytes32 syncHash, uint progress);
    event ReceiveSynchronizationProgress(uint16 indexed srcChainId, uint64 nonce, bytes32 syncHash, uint progress);
    event SynchronizationFee(uint256 fee);
}

File 6 of 7 : IZkLink.sol
pragma solidity ^0.8.0;

// SPDX-License-Identifier: MIT OR Apache-2.0



/// @title ZkLink interface contract
/// @author zk.link
interface IZkLink {
    // stored block info of ZkLink
    struct StoredBlockInfo {
        uint32 blockNumber;
        uint64 priorityOperations;
        bytes32 pendingOnchainOperationsHash;
        uint256 timestamp;
        bytes32 stateHash;
        bytes32 commitment;
        bytes32 syncHash;
    }

    /// @notice Return the network governor
    function networkGovernor() external view returns (address);

    /// @notice Get synchronized progress of zkLink contract known on deployed chain
    function getSynchronizedProgress(StoredBlockInfo memory block) external view returns (uint256 progress);

    /// @notice Combine the `progress` of the other chains of a `syncHash` with self
    function receiveSynchronizationProgress(bytes32 syncHash, uint256 progress) external;
}

File 7 of 7 : ReentrancyGuard.sol
pragma solidity ^0.8.0;

// SPDX-License-Identifier: MIT OR Apache-2.0



/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 *
 * _Since v2.5.0:_ this module is now much more gas efficient, given net gas
 * metering changes introduced in the Istanbul hardfork.
 */
contract ReentrancyGuard {
    /// @dev Address of lock flag variable.
    /// @dev Flag is placed at random memory location to not interfere with Storage contract.
    uint256 private constant LOCK_FLAG_ADDRESS = 0x8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4; // keccak256("ReentrancyGuard") - 1;

    // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/566a774222707e424896c0c390a84dc3c13bdcb2/contracts/security/ReentrancyGuard.sol
    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    function initializeReentrancyGuard() internal {
        uint256 lockSlotOldValue;

        // Storing an initial non-zero value makes deployment a bit more
        // expensive, but in exchange every call to nonReentrant
        // will be cheaper.
        assembly {
            lockSlotOldValue := sload(LOCK_FLAG_ADDRESS)
            sstore(LOCK_FLAG_ADDRESS, _NOT_ENTERED)
        }

        // Check that storage slot for reentrancy guard is empty to rule out possibility of double initialization
        require(lockSlotOldValue == 0, "1B");
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        uint256 _status;
        assembly {
            _status := sload(LOCK_FLAG_ADDRESS)
        }

        // On the first call to nonReentrant, _notEntered will be true
        require(_status == _NOT_ENTERED);

        // Any calls to nonReentrant after this point will fail
        assembly {
            sstore(LOCK_FLAG_ADDRESS, _ENTERED)
        }

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        assembly {
            sstore(LOCK_FLAG_ADDRESS, _NOT_ENTERED)
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IZkLink","name":"_zklink","type":"address"},{"internalType":"contract ILayerZeroEndpoint","name":"_endpoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"payload","type":"bytes"}],"name":"MessageFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"srcChainId","type":"uint16"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"syncHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"progress","type":"uint256"}],"name":"ReceiveSynchronizationProgress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"dstChainId","type":"uint16"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"syncHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"progress","type":"uint256"}],"name":"SendSynchronizationProgress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SynchronizationFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"lzChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"destination","type":"bytes"}],"name":"UpdateDestination","type":"event"},{"inputs":[{"components":[{"internalType":"uint32","name":"blockNumber","type":"uint32"},{"internalType":"uint64","name":"priorityOperations","type":"uint64"},{"internalType":"bytes32","name":"pendingOnchainOperationsHash","type":"bytes32"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bytes32","name":"stateHash","type":"bytes32"},{"internalType":"bytes32","name":"commitment","type":"bytes32"},{"internalType":"bytes32","name":"syncHash","type":"bytes32"}],"internalType":"struct IZkLink.StoredBlockInfo","name":"storedBlockInfo","type":"tuple"},{"internalType":"uint16[]","name":"dstChainIds","type":"uint16[]"},{"internalType":"address payable","name":"refundAddress","type":"address"},{"internalType":"address","name":"zroPaymentAddress","type":"address"},{"internalType":"bytes","name":"adapterParams","type":"bytes"}],"name":"bridgeZkLinkBlock","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"destinations","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"contract ILayerZeroEndpoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"lzChainId","type":"uint16"},{"internalType":"bytes32","name":"syncHash","type":"bytes32"},{"internalType":"uint256","name":"progress","type":"uint256"},{"internalType":"bool","name":"useZro","type":"bool"},{"internalType":"bytes","name":"adapterParams","type":"bytes"}],"name":"estimateZkLinkBlockBridgeFees","outputs":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"zroFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"failedMessages","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"forceResumeReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"srcChainId","type":"uint16"},{"internalType":"bytes","name":"srcPath","type":"bytes"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"srcChainId","type":"uint16"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"nonblockingLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"srcChainId","type":"uint16"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"retryMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"_configType","type":"uint256"},{"internalType":"bytes","name":"_config","type":"bytes"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"dstChainId","type":"uint16"},{"internalType":"bytes","name":"contractAddr","type":"bytes"}],"name":"setDestination","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setReceiveVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setSendVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"zklink","outputs":[{"internalType":"contract IZkLink","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080346100df57601f6118fe38819003918201601f19168301916001600160401b038311848410176100e45780849260409485528339810103126100df5780516001600160a01b0391828216918290036100df57602001519182168092036100df577f8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf46001815491556100b55760018060a01b031990816000541617600055600154161760015560405161180390816100fb8239f35b60405162461bcd60e51b815260206004820152600260248201526118a160f11b6044820152606490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001d575b50361561001b57600080fd5b005b600090813560e01c9081621d3567146111b05750806307e0db171461111857806310ddb1371461107157806323bfea9114610a8e57806342d65a8d146109ef57806351690517146109a3578063528aaea41461097c578063569f2d67146108665780635b8c41e6146107d75780635e280f11146107ae57806366ad5c8a1461069d578063706d8fff146103f7578063cbed8b9c146102b75763d1deba1f0361000f576100c836611422565b959493906000805160206117ae8339815191529392939460018654036102b35761ffff9060028755169182875260209360038552604088208560405180928486833784820190815203019020916001600160401b03871692836000528652604060002054801561027a5761013d368c876114ee565b8781519101200361024357986040928492878b9c888d9c9d5260038252868c2083885194859384378201908152030190209060005286528783600020558101031261023f57604080516001600160401b039590951685528135602086018190529390910135908401819052927f05733e36243171ebe40c342ad0dc0eaf7ad669c7cab794ff21f3f2d1fac40d9590606090a282546001600160a01b031691823b1561023b576044849283604051958694859363b69d5a6960e01b8552600485015260248401525af1801561023057610218575b506001825580f35b61022190611489565b61022c578138610210565b5080fd5b6040513d84823e3d90fd5b8380fd5b8480fd5b60405162461bcd60e51b815260048101879052600f60248201526e125b9d985b1a59081c185e5b1bd859608a1b6044820152606490fd5b60405162461bcd60e51b81526004810188905260116024820152704e6f2073746f726564206d65737361676560781b6044820152606490fd5b8680fd5b50346103b65760803660031901126103b6576102d16113e4565b6024359061ffff908183168093036103f25783926064356001600160401b03811161023f576103049036906004016113f5565b855460405163f39349ef60e01b81529195916001600160a01b03916020908290600490829086165afa9081156103e75761034a9183918a916103b9575b501633146116c4565b6001541691823b156102b35786946103958692604051988997889687956332fb62e760e21b875216600486015260248501526044356044850152608060648501526084840191611709565b03925af18015610230576103a65750f35b6103af90611489565b6103b65780f35b80fd5b6103da915060203d81116103e0575b6103d281836114b2565b8101906116a5565b38610341565b503d6103c8565b6040513d8a823e3d90fd5b600080fd5b50346103b65761040636611543565b835460405163f39349ef60e01b815293919260209290916001600160a01b03919084908790600490829086165afa801561067b5782610451916004988a9161068657501633146116c4565b83600192835416604051978880926303408e4760e41b82525afa95861561067b578796610641575b5061ffff80911695168514610607578486526002835260408620906001600160401b0385116105f3576104ac825461157d565b601f81116105ad575b5086601f8611600114610528579185807f41f0554ecfd3e1b65abd31bac4f803ddb2f22f7d5c2133d51574d8ba0872f82a97969593610517958b9361051d575b501b906000198760031b1c19161790555b604051938385948552840191611709565b0390a280f35b8501359250386104f5565b82885284882090601f198716895b81811061059857509187969593917f41f0554ecfd3e1b65abd31bac4f803ddb2f22f7d5c2133d51574d8ba0872f82a9861051796941061057e575b505085811b019055610506565b840135600019600389901b60f8161c191690553880610571565b86830135845592840192918701918701610536565b828852848820601f870160051c8101918688106105e9575b601f0160051c019082905b8281106105de5750506104b5565b8981550182906105d0565b90915081906105c5565b634e487b7160e01b87526041600452602487fd5b60405162461bcd60e51b8152600481018490526012602482015271125b9d985b1a5908191cdd10da185a5b925960721b6044820152606490fd5b9095508381813d8311610674575b61065981836114b2565b810103126102b3575161ffff811681036102b3579438610479565b503d61064f565b6040513d89823e3d90fd5b6103da9150873d89116103e0576103d281836114b2565b50346103b6576106ac36611422565b949350915030330361076957604082869581010312610764577f05733e36243171ebe40c342ad0dc0eaf7ad669c7cab794ff21f3f2d1fac40d9561ffff602084359401359461071e86866040519485941696846040919493926001600160401b03606083019616825260208201520152565b0390a282546001600160a01b031691823b15610764576044849283604051958694859363b69d5a6960e01b8552600485015260248401525af18015610230576103a65750f35b505050fd5b60405162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206d7573742062652074686973206272696467650000000000006044820152606490fd5b50346103b657806003193601126103b6576001546040516001600160a01b039091168152602090f35b50346103b65760603660031901126103b6576107f16113e4565b6001600160401b039160243583811161022c57610812903690600401611525565b6044359384168094036103f257604060209261ffff610846951681526003845220826040519483868095519384920161165d565b820190815203019020906000526020526020604060002054604051908152f35b50346103b65760031960a03682011261022c576108816113e4565b60643580151580910361023b57608435926001600160401b03841161023f5761ffff60409361091c6108ba6109089736906004016113f5565b6108cb60449792973560243561177e565b9660018060a01b03600154169689519a8b998a98899863040a7bb160e41b8a5216600489015230602489015260a0604489015260a4880190611680565b936064870152858403016084860152611709565b03915afa8015610230578291839161093f575b6040838382519182526020820152f35b9150506040813d604011610974575b8161095b604093836114b2565b8101031261022c5760409150602081519101513861092f565b3d915061094e565b50346103b657806003193601126103b657546040516001600160a01b039091168152602090f35b50346103b65760203660031901126103b6576109d760406109eb9261ffff6109c96113e4565b1681526002602052206115b7565b604051918291602083526020830190611680565b0390f35b50346103b657806109ff36611543565b835460405163f39349ef60e01b81529293926001600160a01b03916020908290600490829086165afa908115610a8357610a4491839188916103b957501633146116c4565b60015416803b1561023f5761ffff858094610395604051978896879586946342d65a8d60e01b8652166004850152604060248501526044840191611709565b6040513d88823e3d90fd5b503660031901610160811261022c5760e0136103b65760e435906001600160401b0382116103b657366023830112156103b6578160040135916001600160401b03831161105d578260051b9060405193610aeb60208401866114b2565b8452602460208501928201019036821161023b57602401915b818310611042575050610104359290506001600160a01b038316830361022c5761012435906001600160a01b038216820361103e57610144356001600160401b03811161023b57610b59903690600401611525565b9160016000805160206117ae833981519152540361023b5760026000805160206117ae8339815191525581511561100a5783546040516317ddac5d60e11b815292906001600160a01b031660043563ffffffff8116908190036102b35760048501526024356001600160401b0381168091036103f25760e4856020938193602483015260443560448301526064356064830152608435608483015260a43560a483015260c43560c48301525afa928315610fff578593610fcb575b50610c1f344761172a565b95855b8251811015610e945761ffff60208260051b8501015116478189526002602052610c4e60408a206115b7565b90815115610e5657600154604051630f428ae960e31b8152600481018590523060248201526001600160a01b039091169290602081604481875afa908115610e4b578c91610e09575b506001600160401b0360018183160111610df5576040805160016001600160401b0393841601909216825260c435602083015281018a9052610d119291610d1f9186907f994cb36f153f493842eb7438e39ebcea11d8842b21d16125644771d2137d758190606090a260405193849130906020840161174d565b03601f1981018452836114b2565b610d2b8960c43561177e565b93833b15610df157918b9391610d6b93610da48d610d7d604051998a988997889662c5803160e81b8852600488015260c0602488015260c4870190611680565b85810360031901604487015290611680565b3060648501526001600160a01b038e1660848501528381036003190160a485015290611680565b03925af180156103e757908891610ddd575b50506000198114610dc957600101610c22565b634e487b7160e01b87526011600452602487fd5b610de690611489565b6102b3578638610db6565b8b80fd5b634e487b7160e01b8c52601160045260248cfd5b90506020813d602011610e43575b81610e24602093836114b2565b81010312610df157516001600160401b0381168103610df15738610c97565b3d9150610e17565b6040513d8e823e3d90fd5b60405162461bcd60e51b8152602060048201526016602482015275151c9d5cdd081c995b5bdd19481b9bdd08195e1a5cdd60521b6044820152606490fd5b868289804710610f7b57610ea983914761172a565b9182610efa575b507f1d3b386da8a7c0cf888afbc4c407c9350d85dd3ff416a3999ecdd2222052ca676020610ede843461172a565b604051908152a160016000805160206117ae8339815191525580f35b81908190819085906001600160a01b03165af13d15610f76573d610f1d816114d3565b90610f2b60405192836114b2565b81528360203d92013e5b15610f41578183610eb0565b60405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b6044820152606490fd5b610f35565b60405162461bcd60e51b815260206004820152602260248201527f4d73672076616c7565206973206e6f7420656e6f75676820666f722062726964604482015261676560f01b6064820152608490fd5b9092506020813d602011610ff7575b81610fe7602093836114b2565b8101031261023f57519138610c14565b3d9150610fda565b6040513d87823e3d90fd5b60405162461bcd60e51b815260206004820152600c60248201526b2737903239ba1031b430b4b760a11b6044820152606490fd5b8280fd5b823561ffff811681036103f257815260209283019201610b04565b634e487b7160e01b82526041600452602482fd5b50346103b65760203660031901126103b6578061108c6113e4565b815460405163f39349ef60e01b81526001600160a01b03916020908290600490829086165afa90811561110d576110ce91839186916103b957501633146116c4565b6001541690813b156111095761ffff602484928360405195869485936310ddb13760e01b85521660048401525af18015610230576103a65750f35b5050fd5b6040513d86823e3d90fd5b50346103b65760203660031901126103b657806111336113e4565b815460405163f39349ef60e01b81526001600160a01b03916020908290600490829086165afa90811561110d5761117591839186916103b957501633146116c4565b6001541690813b156111095761ffff602484928360405195869485936307e0db1760e01b85521660048401525af18015610230576103a65750f35b82346103b6576111bf36611422565b929660018060a0969394961b036001541633036113af57506000805160206117ae8339815191529460018654036102b35761ffff906002875516938487526020976002895261124361121360408a206115b7565b936040518b8101906112388161122a308a8661174d565b03601f1981018352826114b2565b5190209236916114ee565b8981519101200361137c57303b156102b357604051633356ae4560e11b81526004810186905260806024820152978789806112a86001600160401b0361128c6084840189611680565b9616958660448401526003198382030160648401528989611709565b038183305af1988961136a575b506001979815600014611360577fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d9461134894611359936112f73684846114ee565b848151910120898d526003855260408d208560405180928261131f8c8481519384920161165d565b820190815203019020826000528552604060002055604051968796606088526060880190611680565b938601528483036040860152611709565b0390a25580f35b5050505050505580f35b97611376600199611489565b976112b5565b60405162461bcd60e51b815260048101899052600b60248201526a496e76616c69642073726360a81b6044820152606490fd5b62461bcd60e51b815260206004820152601060248201526f14995c5d5a5c9948195b991c1bda5b9d60821b6044820152606490fd5b6004359061ffff821682036103f257565b9181601f840112156103f2578235916001600160401b0383116103f257602083818601950101116103f257565b9060806003198301126103f25760043561ffff811681036103f257916001600160401b03906024358281116103f2578161145e916004016113f5565b9390939260443581811681036103f257926064359182116103f257611485916004016113f5565b9091565b6001600160401b03811161149c57604052565b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b0382111761149c57604052565b6001600160401b03811161149c57601f01601f191660200190565b9291926114fa826114d3565b9161150860405193846114b2565b8294818452818301116103f2578281602093846000960137010152565b9080601f830112156103f257816020611540933591016114ee565b90565b9060406003198301126103f25760043561ffff811681036103f25791602435906001600160401b0382116103f257611485916004016113f5565b90600182811c921680156115ad575b602083101461159757565b634e487b7160e01b600052602260045260246000fd5b91607f169161158c565b90604051918260008254926115cb8461157d565b90818452600194858116908160001461163a57506001146115f7575b50506115f5925003836114b2565b565b9093915060005260209081600020936000915b8183106116225750506115f5935082010138806115e7565b8554888401850152948501948794509183019161160a565b9150506115f594506020925060ff191682840152151560051b82010138806115e7565b60005b8381106116705750506000910152565b8181015183820152602001611660565b906020916116998151809281855285808601910161165d565b601f01601f1916010190565b908160209103126103f257516001600160a01b03811681036103f25790565b156116cb57565b60405162461bcd60e51b815260206004820152601660248201527521b0b63632b91034b9903737ba1033b7bb32b93737b960511b6044820152606490fd5b908060209392818452848401376000828201840152601f01601f1916010190565b9190820391821161173757565b634e487b7160e01b600052601160045260246000fd5b602090611763601494938281519485920161165d565b01906bffffffffffffffffffffffff199060601b1681520190565b90604051916020830152604082015260408152606081018181106001600160401b0382111761149c576040529056fe8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4a26469706673582212201264ea18e0f396a003a7704f4eaa0101a3ee073abe3f83d6f458672a2979729164736f6c63430008120033000000000000000000000000629d74d459f072914f0b2aab9f7232fa36c1baed00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675

Deployed Bytecode

0x608080604052600436101561001d575b50361561001b57600080fd5b005b600090813560e01c9081621d3567146111b05750806307e0db171461111857806310ddb1371461107157806323bfea9114610a8e57806342d65a8d146109ef57806351690517146109a3578063528aaea41461097c578063569f2d67146108665780635b8c41e6146107d75780635e280f11146107ae57806366ad5c8a1461069d578063706d8fff146103f7578063cbed8b9c146102b75763d1deba1f0361000f576100c836611422565b959493906000805160206117ae8339815191529392939460018654036102b35761ffff9060028755169182875260209360038552604088208560405180928486833784820190815203019020916001600160401b03871692836000528652604060002054801561027a5761013d368c876114ee565b8781519101200361024357986040928492878b9c888d9c9d5260038252868c2083885194859384378201908152030190209060005286528783600020558101031261023f57604080516001600160401b039590951685528135602086018190529390910135908401819052927f05733e36243171ebe40c342ad0dc0eaf7ad669c7cab794ff21f3f2d1fac40d9590606090a282546001600160a01b031691823b1561023b576044849283604051958694859363b69d5a6960e01b8552600485015260248401525af1801561023057610218575b506001825580f35b61022190611489565b61022c578138610210565b5080fd5b6040513d84823e3d90fd5b8380fd5b8480fd5b60405162461bcd60e51b815260048101879052600f60248201526e125b9d985b1a59081c185e5b1bd859608a1b6044820152606490fd5b60405162461bcd60e51b81526004810188905260116024820152704e6f2073746f726564206d65737361676560781b6044820152606490fd5b8680fd5b50346103b65760803660031901126103b6576102d16113e4565b6024359061ffff908183168093036103f25783926064356001600160401b03811161023f576103049036906004016113f5565b855460405163f39349ef60e01b81529195916001600160a01b03916020908290600490829086165afa9081156103e75761034a9183918a916103b9575b501633146116c4565b6001541691823b156102b35786946103958692604051988997889687956332fb62e760e21b875216600486015260248501526044356044850152608060648501526084840191611709565b03925af18015610230576103a65750f35b6103af90611489565b6103b65780f35b80fd5b6103da915060203d81116103e0575b6103d281836114b2565b8101906116a5565b38610341565b503d6103c8565b6040513d8a823e3d90fd5b600080fd5b50346103b65761040636611543565b835460405163f39349ef60e01b815293919260209290916001600160a01b03919084908790600490829086165afa801561067b5782610451916004988a9161068657501633146116c4565b83600192835416604051978880926303408e4760e41b82525afa95861561067b578796610641575b5061ffff80911695168514610607578486526002835260408620906001600160401b0385116105f3576104ac825461157d565b601f81116105ad575b5086601f8611600114610528579185807f41f0554ecfd3e1b65abd31bac4f803ddb2f22f7d5c2133d51574d8ba0872f82a97969593610517958b9361051d575b501b906000198760031b1c19161790555b604051938385948552840191611709565b0390a280f35b8501359250386104f5565b82885284882090601f198716895b81811061059857509187969593917f41f0554ecfd3e1b65abd31bac4f803ddb2f22f7d5c2133d51574d8ba0872f82a9861051796941061057e575b505085811b019055610506565b840135600019600389901b60f8161c191690553880610571565b86830135845592840192918701918701610536565b828852848820601f870160051c8101918688106105e9575b601f0160051c019082905b8281106105de5750506104b5565b8981550182906105d0565b90915081906105c5565b634e487b7160e01b87526041600452602487fd5b60405162461bcd60e51b8152600481018490526012602482015271125b9d985b1a5908191cdd10da185a5b925960721b6044820152606490fd5b9095508381813d8311610674575b61065981836114b2565b810103126102b3575161ffff811681036102b3579438610479565b503d61064f565b6040513d89823e3d90fd5b6103da9150873d89116103e0576103d281836114b2565b50346103b6576106ac36611422565b949350915030330361076957604082869581010312610764577f05733e36243171ebe40c342ad0dc0eaf7ad669c7cab794ff21f3f2d1fac40d9561ffff602084359401359461071e86866040519485941696846040919493926001600160401b03606083019616825260208201520152565b0390a282546001600160a01b031691823b15610764576044849283604051958694859363b69d5a6960e01b8552600485015260248401525af18015610230576103a65750f35b505050fd5b60405162461bcd60e51b815260206004820152601a60248201527f43616c6c6572206d7573742062652074686973206272696467650000000000006044820152606490fd5b50346103b657806003193601126103b6576001546040516001600160a01b039091168152602090f35b50346103b65760603660031901126103b6576107f16113e4565b6001600160401b039160243583811161022c57610812903690600401611525565b6044359384168094036103f257604060209261ffff610846951681526003845220826040519483868095519384920161165d565b820190815203019020906000526020526020604060002054604051908152f35b50346103b65760031960a03682011261022c576108816113e4565b60643580151580910361023b57608435926001600160401b03841161023f5761ffff60409361091c6108ba6109089736906004016113f5565b6108cb60449792973560243561177e565b9660018060a01b03600154169689519a8b998a98899863040a7bb160e41b8a5216600489015230602489015260a0604489015260a4880190611680565b936064870152858403016084860152611709565b03915afa8015610230578291839161093f575b6040838382519182526020820152f35b9150506040813d604011610974575b8161095b604093836114b2565b8101031261022c5760409150602081519101513861092f565b3d915061094e565b50346103b657806003193601126103b657546040516001600160a01b039091168152602090f35b50346103b65760203660031901126103b6576109d760406109eb9261ffff6109c96113e4565b1681526002602052206115b7565b604051918291602083526020830190611680565b0390f35b50346103b657806109ff36611543565b835460405163f39349ef60e01b81529293926001600160a01b03916020908290600490829086165afa908115610a8357610a4491839188916103b957501633146116c4565b60015416803b1561023f5761ffff858094610395604051978896879586946342d65a8d60e01b8652166004850152604060248501526044840191611709565b6040513d88823e3d90fd5b503660031901610160811261022c5760e0136103b65760e435906001600160401b0382116103b657366023830112156103b6578160040135916001600160401b03831161105d578260051b9060405193610aeb60208401866114b2565b8452602460208501928201019036821161023b57602401915b818310611042575050610104359290506001600160a01b038316830361022c5761012435906001600160a01b038216820361103e57610144356001600160401b03811161023b57610b59903690600401611525565b9160016000805160206117ae833981519152540361023b5760026000805160206117ae8339815191525581511561100a5783546040516317ddac5d60e11b815292906001600160a01b031660043563ffffffff8116908190036102b35760048501526024356001600160401b0381168091036103f25760e4856020938193602483015260443560448301526064356064830152608435608483015260a43560a483015260c43560c48301525afa928315610fff578593610fcb575b50610c1f344761172a565b95855b8251811015610e945761ffff60208260051b8501015116478189526002602052610c4e60408a206115b7565b90815115610e5657600154604051630f428ae960e31b8152600481018590523060248201526001600160a01b039091169290602081604481875afa908115610e4b578c91610e09575b506001600160401b0360018183160111610df5576040805160016001600160401b0393841601909216825260c435602083015281018a9052610d119291610d1f9186907f994cb36f153f493842eb7438e39ebcea11d8842b21d16125644771d2137d758190606090a260405193849130906020840161174d565b03601f1981018452836114b2565b610d2b8960c43561177e565b93833b15610df157918b9391610d6b93610da48d610d7d604051998a988997889662c5803160e81b8852600488015260c0602488015260c4870190611680565b85810360031901604487015290611680565b3060648501526001600160a01b038e1660848501528381036003190160a485015290611680565b03925af180156103e757908891610ddd575b50506000198114610dc957600101610c22565b634e487b7160e01b87526011600452602487fd5b610de690611489565b6102b3578638610db6565b8b80fd5b634e487b7160e01b8c52601160045260248cfd5b90506020813d602011610e43575b81610e24602093836114b2565b81010312610df157516001600160401b0381168103610df15738610c97565b3d9150610e17565b6040513d8e823e3d90fd5b60405162461bcd60e51b8152602060048201526016602482015275151c9d5cdd081c995b5bdd19481b9bdd08195e1a5cdd60521b6044820152606490fd5b868289804710610f7b57610ea983914761172a565b9182610efa575b507f1d3b386da8a7c0cf888afbc4c407c9350d85dd3ff416a3999ecdd2222052ca676020610ede843461172a565b604051908152a160016000805160206117ae8339815191525580f35b81908190819085906001600160a01b03165af13d15610f76573d610f1d816114d3565b90610f2b60405192836114b2565b81528360203d92013e5b15610f41578183610eb0565b60405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b6044820152606490fd5b610f35565b60405162461bcd60e51b815260206004820152602260248201527f4d73672076616c7565206973206e6f7420656e6f75676820666f722062726964604482015261676560f01b6064820152608490fd5b9092506020813d602011610ff7575b81610fe7602093836114b2565b8101031261023f57519138610c14565b3d9150610fda565b6040513d87823e3d90fd5b60405162461bcd60e51b815260206004820152600c60248201526b2737903239ba1031b430b4b760a11b6044820152606490fd5b8280fd5b823561ffff811681036103f257815260209283019201610b04565b634e487b7160e01b82526041600452602482fd5b50346103b65760203660031901126103b6578061108c6113e4565b815460405163f39349ef60e01b81526001600160a01b03916020908290600490829086165afa90811561110d576110ce91839186916103b957501633146116c4565b6001541690813b156111095761ffff602484928360405195869485936310ddb13760e01b85521660048401525af18015610230576103a65750f35b5050fd5b6040513d86823e3d90fd5b50346103b65760203660031901126103b657806111336113e4565b815460405163f39349ef60e01b81526001600160a01b03916020908290600490829086165afa90811561110d5761117591839186916103b957501633146116c4565b6001541690813b156111095761ffff602484928360405195869485936307e0db1760e01b85521660048401525af18015610230576103a65750f35b82346103b6576111bf36611422565b929660018060a0969394961b036001541633036113af57506000805160206117ae8339815191529460018654036102b35761ffff906002875516938487526020976002895261124361121360408a206115b7565b936040518b8101906112388161122a308a8661174d565b03601f1981018352826114b2565b5190209236916114ee565b8981519101200361137c57303b156102b357604051633356ae4560e11b81526004810186905260806024820152978789806112a86001600160401b0361128c6084840189611680565b9616958660448401526003198382030160648401528989611709565b038183305af1988961136a575b506001979815600014611360577fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d9461134894611359936112f73684846114ee565b848151910120898d526003855260408d208560405180928261131f8c8481519384920161165d565b820190815203019020826000528552604060002055604051968796606088526060880190611680565b938601528483036040860152611709565b0390a25580f35b5050505050505580f35b97611376600199611489565b976112b5565b60405162461bcd60e51b815260048101899052600b60248201526a496e76616c69642073726360a81b6044820152606490fd5b62461bcd60e51b815260206004820152601060248201526f14995c5d5a5c9948195b991c1bda5b9d60821b6044820152606490fd5b6004359061ffff821682036103f257565b9181601f840112156103f2578235916001600160401b0383116103f257602083818601950101116103f257565b9060806003198301126103f25760043561ffff811681036103f257916001600160401b03906024358281116103f2578161145e916004016113f5565b9390939260443581811681036103f257926064359182116103f257611485916004016113f5565b9091565b6001600160401b03811161149c57604052565b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b0382111761149c57604052565b6001600160401b03811161149c57601f01601f191660200190565b9291926114fa826114d3565b9161150860405193846114b2565b8294818452818301116103f2578281602093846000960137010152565b9080601f830112156103f257816020611540933591016114ee565b90565b9060406003198301126103f25760043561ffff811681036103f25791602435906001600160401b0382116103f257611485916004016113f5565b90600182811c921680156115ad575b602083101461159757565b634e487b7160e01b600052602260045260246000fd5b91607f169161158c565b90604051918260008254926115cb8461157d565b90818452600194858116908160001461163a57506001146115f7575b50506115f5925003836114b2565b565b9093915060005260209081600020936000915b8183106116225750506115f5935082010138806115e7565b8554888401850152948501948794509183019161160a565b9150506115f594506020925060ff191682840152151560051b82010138806115e7565b60005b8381106116705750506000910152565b8181015183820152602001611660565b906020916116998151809281855285808601910161165d565b601f01601f1916010190565b908160209103126103f257516001600160a01b03811681036103f25790565b156116cb57565b60405162461bcd60e51b815260206004820152601660248201527521b0b63632b91034b9903737ba1033b7bb32b93737b960511b6044820152606490fd5b908060209392818452848401376000828201840152601f01601f1916010190565b9190820391821161173757565b634e487b7160e01b600052601160045260246000fd5b602090611763601494938281519485920161165d565b01906bffffffffffffffffffffffff199060601b1681520190565b90604051916020830152604082015260408152606081018181106001600160401b0382111761149c576040529056fe8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4a26469706673582212201264ea18e0f396a003a7704f4eaa0101a3ee073abe3f83d6f458672a2979729164736f6c63430008120033

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

000000000000000000000000629d74d459f072914f0b2aab9f7232fa36c1baed00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675

-----Decoded View---------------
Arg [0] : _zklink (address): 0x629D74d459F072914F0b2AAb9F7232fA36c1BAEd
Arg [1] : _endpoint (address): 0x66A71Dcef29A0fFBDBE3c6a460a3B5BC225Cd675

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000629d74d459f072914f0b2aab9f7232fa36c1baed
Arg [1] : 00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675


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  ]
[ 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.