Sepolia Testnet

Contract

0xda3b7cB145EE712b10a00a7A8da33580EB784f1B

Overview

ETH Balance

0.0999969 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Start Ping Pong58829772024-05-11 20:14:00248 days ago1715458440IN
0xda3b7cB1...0EB784f1B
0 ETH0.000361451.50057542
Start Ping Pong58753802024-05-10 16:28:00249 days ago1715358480IN
0xda3b7cB1...0EB784f1B
0 ETH0.000361811.50207387
Start Ping Pong58710982024-05-10 1:24:36250 days ago1715304276IN
0xda3b7cB1...0EB784f1B
0 ETH0.000361391.50035183
Start Ping Pong58710762024-05-10 1:20:12250 days ago1715304012IN
0xda3b7cB1...0EB784f1B
0 ETH0.000361381.50030929
Start Ping Pong58705752024-05-09 23:34:24250 days ago1715297664IN
0xda3b7cB1...0EB784f1B
0 ETH0.000361421.50047963
Transfer58705452024-05-09 23:28:00250 days ago1715297280IN
0xda3b7cB1...0EB784f1B
0.1 ETH0.000031591.50046513
Set Trusted Remo...58479972024-05-06 10:43:24253 days ago1714992204IN
0xda3b7cB1...0EB784f1B
0 ETH0.0029786662.6164553
Set Message Bus58479972024-05-06 10:43:24253 days ago1714992204IN
0xda3b7cB1...0EB784f1B
0 ETH0.0029547462.6164553

Latest 5 internal transactions

Advanced mode:
Parent Transaction Hash Block
From
To
58829772024-05-11 20:14:00248 days ago1715458440
0xda3b7cB1...0EB784f1B
0.00000062 ETH
58753802024-05-10 16:28:00249 days ago1715358480
0xda3b7cB1...0EB784f1B
0.00000062 ETH
58710982024-05-10 1:24:36250 days ago1715304276
0xda3b7cB1...0EB784f1B
0.00000062 ETH
58710762024-05-10 1:20:12250 days ago1715304012
0xda3b7cB1...0EB784f1B
0.00000062 ETH
58705752024-05-09 23:34:24250 days ago1715297664
0xda3b7cB1...0EB784f1B
0.00000062 ETH
Loading...
Loading

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

Contract Name:
LegacyPingPong

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : LegacyPingPong.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {LegacyReceiver} from "./LegacyReceiver.sol";

import {Address} from "@openzeppelin/contracts/utils/Address.sol";

/// @notice A simple app that sends a message to the remote PingPongApp, which will respond with a message back.
/// This app can be loaded with a native asset, which will be used to pay for the messages sent.
/// Note: we deal with uint256 chain IDs in this contract as the legacy MessageBus contract is using uint256 chain IDs.
contract LegacyPingPong is LegacyReceiver {
    uint256 internal constant MESSAGE_LENGTH = 32;
    uint256 internal constant DEFAULT_GAS_LIMIT = 500_000;
    uint256 public gasLimit;

    event GasLimitSet(uint256 gasLimit);
    event PingDisrupted(uint256 counter);
    event PingReceived(uint256 counter);
    event PingSent(uint256 counter);

    constructor(address owner_) LegacyReceiver(owner_) {
        _setGasLimit(DEFAULT_GAS_LIMIT);
    }

    /// @notice Enables the contract to accept native asset.
    receive() external payable {}

    /// @notice Allows the Owner to set the gas limit for the interchain messages.
    function setGasLimit(uint256 gasLimit_) external onlyOwner {
        _setGasLimit(gasLimit_);
    }

    /// @notice Allows the Owner to withdraw the native asset from the contract.
    function withdraw() external onlyOwner {
        Address.sendValue(payable(msg.sender), address(this).balance);
    }

    /// @notice Starts the ping-pong message exchange with the remote PingPongApp.
    function startPingPong(uint256 dstChainId, uint256 counter) external {
        _sendPingPongMessage({dstChainId: dstChainId, counter: counter, lowBalanceRevert: true});
    }

    /// @notice Returns the fee to send a single ping message to the remote PingPongApp.
    function getPingFee(uint256 dstChainId) public view returns (uint256) {
        return _getMessageFee({dstChainId: dstChainId, gasLimit: gasLimit, messageLen: MESSAGE_LENGTH});
    }

    /// @dev Handle the verified message.
    function _handleMessage(
        bytes32, // srcAddress
        uint256 srcChainId,
        bytes calldata message,
        address // executor
    )
        internal
        override
    {
        uint256 counter = abi.decode(message, (uint256));
        emit PingReceived(counter);
        if (counter > 0) {
            _sendPingPongMessage({dstChainId: srcChainId, counter: counter - 1, lowBalanceRevert: false});
        }
    }

    /// @dev Sends a message to the PingPongApp on the remote chain.
    /// If `counter > 0`, the remote app will respond with a message to this app, decrementing the counter.
    /// Once the counter reaches 0, the remote app will not respond.
    function _sendPingPongMessage(uint256 dstChainId, uint256 counter, bool lowBalanceRevert) internal {
        uint256 pingFee = getPingFee(dstChainId);
        if (address(this).balance < pingFee && !lowBalanceRevert) {
            emit PingDisrupted(counter);
            return;
        }
        bytes memory message = abi.encode(counter);
        _sendMessage({dstChainId: dstChainId, messageFee: pingFee, gasLimit: gasLimit, message: message});
        emit PingSent(counter);
    }

    /// @dev Sets the gas limit for the interchain messages.
    function _setGasLimit(uint256 gasLimit_) internal {
        gasLimit = gasLimit_;
        emit GasLimitSet(gasLimit_);
    }
}

File 2 of 9 : LegacyReceiver.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {LegacyReceiverEvents} from "./events/LegacyReceiverEvents.sol";
import {ILegacyReceiver} from "./interfaces/ILegacyReceiver.sol";
import {IMessageBus} from "./interfaces/IMessageBus.sol";
import {LegacyOptionsLib} from "./libs/LegacyOptions.sol";

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

abstract contract LegacyReceiver is Ownable, LegacyReceiverEvents, ILegacyReceiver {
    address public messageBus;
    mapping(uint256 chainId => bytes32 trustedRemote) public trustedRemotes;

    error LegacyReceiver__BalanceBelowMin(uint256 actual, uint256 required);
    error LegacyReceiver__ChainIdNotRemote(uint256 chainId);
    error LegacyReceiver__CallerNotMessageBus(address caller);
    error LegacyReceiver__SrcCallerNotTrusted(uint256 chainId, bytes32 srcCaller);
    error LegacyReceiver__TrustedRemoteZeroAddress(uint256 chainId);

    constructor(address owner_) Ownable(owner_) {}

    function setMessageBus(address messageBus_) external onlyOwner {
        messageBus = messageBus_;
        emit MessageBusSet(messageBus_);
    }

    function setTrustedRemote(uint256 remoteChainId, bytes32 remoteApp) external onlyOwner {
        if (remoteChainId == block.chainid) {
            revert LegacyReceiver__ChainIdNotRemote(remoteChainId);
        }
        trustedRemotes[remoteChainId] = remoteApp;
        emit TrustedRemoteSet(remoteChainId, remoteApp);
    }

    function executeMessage(
        bytes32 srcAddress,
        uint256 srcChainId,
        bytes calldata message,
        address executor
    )
        external
    {
        if (msg.sender != messageBus) {
            revert LegacyReceiver__CallerNotMessageBus(msg.sender);
        }
        if (trustedRemotes[srcChainId] != srcAddress) {
            revert LegacyReceiver__SrcCallerNotTrusted(srcChainId, srcAddress);
        }
        _handleMessage(srcAddress, srcChainId, message, executor);
    }

    /// @dev Handle the verified message.
    function _handleMessage(
        bytes32 srcAddress,
        uint256 srcChainId,
        bytes calldata message,
        address executor
    )
        internal
        virtual;

    /// @dev Sends a message to the trusted remote app.
    function _sendMessage(uint256 dstChainId, uint256 messageFee, uint256 gasLimit, bytes memory message) internal {
        bytes32 dstRemote = trustedRemotes[dstChainId];
        if (dstRemote == 0) {
            revert LegacyReceiver__TrustedRemoteZeroAddress(dstChainId);
        }
        if (address(this).balance < messageFee) {
            revert LegacyReceiver__BalanceBelowMin(address(this).balance, messageFee);
        }
        bytes memory options = LegacyOptionsLib.encodeLegacyOptions(gasLimit);
        IMessageBus(messageBus).sendMessage{value: messageFee}({
            receiver: dstRemote,
            dstChainId: dstChainId,
            message: message,
            options: options
        });
    }

    /// @notice Calculates the fee to send a message to the remote app.
    function _getMessageFee(
        uint256 dstChainId,
        uint256 gasLimit,
        uint256 messageLen
    )
        internal
        view
        returns (uint256 fee)
    {
        bytes memory options = LegacyOptionsLib.encodeLegacyOptions(gasLimit);
        fee = IMessageBus(messageBus).estimateFeeExact(dstChainId, options, messageLen);
    }
}

File 3 of 9 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

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

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

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

abstract contract LegacyReceiverEvents {
    event MessageBusSet(address messageBus);
    event TrustedRemoteSet(uint256 chainId, bytes32 trustedRemote);
}

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

interface ILegacyReceiver {
    function executeMessage(bytes32 srcAddress, uint256 srcChainId, bytes memory message, address executor) external;
}

File 6 of 9 : IMessageBus.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IMessageBus {
    error MessageBus__ReceiverNotEVM(bytes32 receiver);

    /// @notice Sends a message to a receiving contract address on another chain.
    /// Sender must make sure that the message is unique and not a duplicate message.
    /// @dev Legacy MessageBus only supports V1 of the options format, which specifies only the gas limit.
    /// @param receiver     The bytes32 address of the destination contract to be called
    /// @param dstChainId   The destination chain ID - typically, standard EVM chain ID, but differs on nonEVM chains
    /// @param message      The arbitrary payload to pass to the destination chain receiver
    /// @param options      Versioned struct used to instruct relayer on how to proceed with gas limits
    function sendMessage(
        bytes32 receiver,
        uint256 dstChainId,
        bytes memory message,
        bytes memory options
    )
        external
        payable;

    /// @notice Allows the Interchain Governor to set the gas buffer for sending the interchain messages.
    /// Note: The gas buffer is added to the gas limit requested by the sending app to cover the gas usage
    /// of the MessageBus contract on the destination chain.
    function setGasBuffer(uint64 gasBuffer_) external;

    /// @notice Allows the Interchain Governor to set the message length in bytes to be used for fee estimation.
    /// This does not affect the sendMessage function, but only the fee estimation.
    function setMessageLengthEstimate(uint256 length) external;

    /// @notice Returns the preset message length in bytes used for fee estimation.
    function messageLengthEstimate() external view returns (uint256);

    /// @notice Returns srcGasToken fee to charge in wei for the cross-chain message based on the gas limit.
    /// @dev This function is using the preset message length to estimate the gas fee. This should cover most cases,
    /// if the message length is lower than the preset value. For more accurate fee estimation, use estimateFeeExact.
    /// @param dstChainId   The destination chain ID - typically, standard EVM chain ID, but differs on nonEVM chains
    /// @param options      Versioned struct used to instruct relayer on how to proceed with gas limits
    function estimateFee(uint256 dstChainId, bytes memory options) external view returns (uint256);

    /// @notice Returns srcGasToken fee to charge in wei for the cross-chain message based on the message length
    /// and the gas limit.
    /// @param dstChainId   The destination chain ID - typically, standard EVM chain ID, but differs on nonEVM chains
    /// @param options      Versioned struct used to instruct relayer on how to proceed with gas limits
    /// @param messageLen   The length of the message to be sent in bytes
    function estimateFeeExact(
        uint256 dstChainId,
        bytes memory options,
        uint256 messageLen
    )
        external
        view
        returns (uint256);

    /// @notice Returns the nonce of MessageBus: the amount of sent messages so far.
    function nonce() external view returns (uint64);
}

File 7 of 9 : LegacyOptions.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library LegacyOptionsLib {
    /// @notice Supported version of the legacy options format.
    uint16 internal constant LEGACY_OPTIONS_VERSION = 1;
    /// @dev The length of the legacy options format: 2 bytes for the version and 32 bytes for the gas limit.
    uint256 private constant LEGACY_OPTIONS_LENGTH = 34;
    /// @dev The offset of the gas limit in the legacy options format.
    uint256 private constant GAS_LIMIT_OFFSET = 2;

    error LegacyOptionsLib__PayloadInvalid(bytes legacyOpts);

    /// @notice Encodes the gas limit into a legacy options format.
    /// @param gasLimit     The gas limit to encode.
    /// @return legacyOpts  The encoded legacy options
    function encodeLegacyOptions(uint256 gasLimit) internal pure returns (bytes memory legacyOpts) {
        return abi.encodePacked(LEGACY_OPTIONS_VERSION, gasLimit);
    }

    /// @notice Decodes the gas limit from a legacy options format.
    /// @param legacyOpts   The encoded legacy options
    /// @return gasLimit    The gas limit
    function decodeLegacyOptions(bytes calldata legacyOpts) internal pure returns (uint256 gasLimit) {
        if (legacyOpts.length != LEGACY_OPTIONS_LENGTH) {
            revert LegacyOptionsLib__PayloadInvalid(legacyOpts);
        }
        uint16 version = uint16(bytes2(legacyOpts[:GAS_LIMIT_OFFSET]));
        if (version != LEGACY_OPTIONS_VERSION) {
            revert LegacyOptionsLib__PayloadInvalid(legacyOpts);
        }
        gasLimit = uint256(bytes32(legacyOpts[GAS_LIMIT_OFFSET:]));
    }
}

File 8 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

File 9 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/=node_modules/@openzeppelin/",
    "@synapsecns/=node_modules/@synapsecns/",
    "ds-test/=node_modules/ds-test/src/",
    "forge-std/=node_modules/forge-std/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"required","type":"uint256"}],"name":"LegacyReceiver__BalanceBelowMin","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"LegacyReceiver__CallerNotMessageBus","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"LegacyReceiver__ChainIdNotRemote","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bytes32","name":"srcCaller","type":"bytes32"}],"name":"LegacyReceiver__SrcCallerNotTrusted","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"LegacyReceiver__TrustedRemoteZeroAddress","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"gasLimit","type":"uint256"}],"name":"GasLimitSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"messageBus","type":"address"}],"name":"MessageBusSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"counter","type":"uint256"}],"name":"PingDisrupted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"counter","type":"uint256"}],"name":"PingReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"counter","type":"uint256"}],"name":"PingSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"trustedRemote","type":"bytes32"}],"name":"TrustedRemoteSet","type":"event"},{"inputs":[{"internalType":"bytes32","name":"srcAddress","type":"bytes32"},{"internalType":"uint256","name":"srcChainId","type":"uint256"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"address","name":"executor","type":"address"}],"name":"executeMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gasLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"dstChainId","type":"uint256"}],"name":"getPingFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageBus","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gasLimit_","type":"uint256"}],"name":"setGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"messageBus_","type":"address"}],"name":"setMessageBus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"remoteChainId","type":"uint256"},{"internalType":"bytes32","name":"remoteApp","type":"bytes32"}],"name":"setTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"dstChainId","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"}],"name":"startPingPong","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"trustedRemotes","outputs":[{"internalType":"bytes32","name":"trustedRemote","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x6080604052600436106100c65760003560e01c80638da5cb5b1161007f578063bd3583ae11610059578063bd3583ae14610210578063ee7d72b414610230578063f2fde38b14610250578063f68016b71461027057600080fd5b80638da5cb5b1461019e578063a1a227fa146101d0578063a6060871146101f057600080fd5b8063119141fd146100d2578063162c0700146101055780633ccfd60b14610132578063547cad1214610149578063715018a61461016957806378e3ce1a1461017e57600080fd5b366100cd57005b600080fd5b3480156100de57600080fd5b506100f26100ed366004610886565b610286565b6040519081526020015b60405180910390f35b34801561011157600080fd5b506100f2610120366004610886565b60026020526000908152604090205481565b34801561013e57600080fd5b5061014761029c565b005b34801561015557600080fd5b506101476101643660046108bb565b6102b0565b34801561017557600080fd5b5061014761030d565b34801561018a57600080fd5b506101476101993660046108dd565b61031f565b3480156101aa57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016100fc565b3480156101dc57600080fd5b506001546101b8906001600160a01b031681565b3480156101fc57600080fd5b5061014761020b3660046108ff565b61032f565b34801561021c57600080fd5b5061014761022b3660046108dd565b6103ad565b34801561023c57600080fd5b5061014761024b366004610886565b610427565b34801561025c57600080fd5b5061014761026b3660046108bb565b61043b565b34801561027c57600080fd5b506100f260035481565b6000610296826003546020610476565b92915050565b6102a4610501565b6102ae334761052e565b565b6102b8610501565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f0a0a1a0db7fe5a57ba5ed189b051d9133d8309bee1c44c839fa1e780f71d0229906020015b60405180910390a150565b610315610501565b6102ae60006105ca565b61032b8282600161061a565b5050565b6001546001600160a01b0316331461036157604051635fcfc41760e01b81523360048201526024015b60405180910390fd5b600084815260026020526040902054851461039957604051635b891af160e01b81526004810185905260248101869052604401610358565b6103a685858585856106e0565b5050505050565b6103b5610501565b4682036103d857604051636f6fd2e160e11b815260048101839052602401610358565b60008281526002602090815260409182902083905581518481529081018390527f5ef795cb1e8a0414f125639be5e8cda1df8f46854a2e841c5e2dc1e8b0b8ef1d910160405180910390a15050565b61042f610501565b6104388161074d565b50565b610443610501565b6001600160a01b03811661046d57604051631e4fbdf760e01b815260006004820152602401610358565b610438816105ca565b60008061048284610782565b600154604051630d0bc07760e21b81529192506001600160a01b03169063342f01dc906104b7908890859088906004016109dc565b602060405180830381865afa1580156104d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f89190610a05565b95945050505050565b6000546001600160a01b031633146102ae5760405163118cdaa760e01b8152336004820152602401610358565b804710156105515760405163cd78605960e01b8152306004820152602401610358565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461059e576040519150601f19603f3d011682016040523d82523d6000602084013e6105a3565b606091505b50509050806105c557604051630a12f52160e11b815260040160405180910390fd5b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061062584610286565b90508047108015610634575081155b15610672576040518381527ff83d5148c4e705c82778f8aed1bb387ea5a8c0046cd647c807b70d65932210c29060200160405180910390a150505050565b60008360405160200161068791815260200190565b60405160208183030381529060405290506106a68583600354846107ab565b6040518481527f14089a5f67ef0667796ead5223612a15d24422be4bdaa19abc32fb26d4c8b3db9060200160405180910390a15050505050565b60006106ee83850185610886565b90507f51c4f05cea43f3d4604f77fd5a656743088090aa726deb5e3a9f670d8da75d658160405161072191815260200190565b60405180910390a18015610745576107458561073e600184610a1e565b600061061a565b505050505050565b60038190556040518181527f336210500e2973a38a8d7b3f978ac5bf874a3326119f3dff68651e472a1ae77290602001610302565b60408051600160f01b602082015260228082019390935281518082039093018352604201905290565b600084815260026020526040812054908190036107de5760405163316419c560e21b815260048101869052602401610358565b8347101561080857604051635b56a22d60e11b815247600482015260248101859052604401610358565b600061081384610782565b60015460405163ac8a4c1b60e01b81529192506001600160a01b03169063ac8a4c1b90879061084c9086908b9089908890600401610a3f565b6000604051808303818588803b15801561086557600080fd5b505af1158015610879573d6000803e3d6000fd5b5050505050505050505050565b60006020828403121561089857600080fd5b5035919050565b80356001600160a01b03811681146108b657600080fd5b919050565b6000602082840312156108cd57600080fd5b6108d68261089f565b9392505050565b600080604083850312156108f057600080fd5b50508035926020909101359150565b60008060008060006080868803121561091757600080fd5b8535945060208601359350604086013567ffffffffffffffff8082111561093d57600080fd5b818801915088601f83011261095157600080fd5b81358181111561096057600080fd5b89602082850101111561097257600080fd5b60208301955080945050505061098a6060870161089f565b90509295509295909350565b6000815180845260005b818110156109bc576020818501810151868301820152016109a0565b506000602082860101526020601f19601f83011685010191505092915050565b8381526060602082015260006109f56060830185610996565b9050826040830152949350505050565b600060208284031215610a1757600080fd5b5051919050565b8181038181111561029657634e487b7160e01b600052601160045260246000fd5b848152836020820152608060408201526000610a5e6080830185610996565b8281036060840152610a708185610996565b97965050505050505056fea2646970667358221220734fcc0a0a74ae4f1622b7d64bce11afcd2466daf40f8e6678f7cc4bc3bc30f364736f6c63430008140033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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