Contract

0x4af3397FB17c35cE31Bc6E006D60C60136Fa0885

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

-

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Vote6483702024-12-19 2:37:134 mins ago1734575833IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6483702024-12-19 2:37:134 mins ago1734575833IN
0x4af3397F...136Fa0885
0 S0.000032051
Vote6483702024-12-19 2:37:134 mins ago1734575833IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6483702024-12-19 2:37:134 mins ago1734575833IN
0x4af3397F...136Fa0885
0 S0.000032051
Vote6483702024-12-19 2:37:134 mins ago1734575833IN
0x4af3397F...136Fa0885
0 S0.000032051
Vote6483702024-12-19 2:37:134 mins ago1734575833IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6483702024-12-19 2:37:134 mins ago1734575833IN
0x4af3397F...136Fa0885
0 S0.000032051
Vote6483702024-12-19 2:37:134 mins ago1734575833IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6483702024-12-19 2:37:134 mins ago1734575833IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6483702024-12-19 2:37:134 mins ago1734575833IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6482052024-12-19 2:34:237 mins ago1734575663IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6482052024-12-19 2:34:237 mins ago1734575663IN
0x4af3397F...136Fa0885
0 S0.000032051
Vote6482052024-12-19 2:34:237 mins ago1734575663IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6482042024-12-19 2:34:237 mins ago1734575663IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6482042024-12-19 2:34:237 mins ago1734575663IN
0x4af3397F...136Fa0885
0 S0.000032051
Vote6482032024-12-19 2:34:237 mins ago1734575663IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6482032024-12-19 2:34:237 mins ago1734575663IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6482032024-12-19 2:34:237 mins ago1734575663IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6482032024-12-19 2:34:237 mins ago1734575663IN
0x4af3397F...136Fa0885
0 S0.000032041
Vote6482022024-12-19 2:34:237 mins ago1734575663IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6479942024-12-19 2:30:4910 mins ago1734575449IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6479942024-12-19 2:30:4910 mins ago1734575449IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6479942024-12-19 2:30:4910 mins ago1734575449IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6479932024-12-19 2:30:4910 mins ago1734575449IN
0x4af3397F...136Fa0885
0 S0.000032061
Vote6479932024-12-19 2:30:4910 mins ago1734575449IN
0x4af3397F...136Fa0885
0 S0.000032061
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MessageBus

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
File 1 of 2 : MessageBus.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.27;

import {IUpdateVerifier} from "./interfaces/IUpdateVerifier.sol";

/// MessageBus provides a reliable communication channel for validators to compose the state oracle update.
/// @custom:security-contact [email protected]
contract MessageBus {
    IUpdateVerifier public immutable updateVerifier;

    event Vote(bytes20 messageHash, uint32 chainId, bytes signature, address sender);

    constructor(IUpdateVerifier _updateVerifier) {
        require(address(_updateVerifier) != address(0), "UpdateVerifier address not set");
        updateVerifier = _updateVerifier;
    }

    /// Send a vote for a state oracle update.
    function vote(
        bytes20 messageHash,
        uint32 chainId,
        bytes calldata signature
    ) external {
        require(updateVerifier.validatorWeight(msg.sender) > 0, "Not a validator");
        emit Vote(messageHash, chainId, signature, msg.sender);
    }
}

File 2 of 2 : IUpdateVerifier.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.27;

/// Update verifier provides a way to verify validators signatures on an update.
/// It provides access to the validators registry for the purpose of inter-chain synchronization.
interface IUpdateVerifier {
    struct Validator {
        uint256 id;
        address addr;
        uint256 weight;
    }

    /// Verify the state oracle update signatures
    function verifyUpdate(uint256 blockNum, bytes32 stateRoot, uint256 chainId, bytes calldata newValidators, address proofVerifier, address updateVerifier, address exitAdmin, bytes[] calldata signatures) external view returns (uint256[] memory);

    /// Write into the validators registry - reverts if the registry is readonly.
    function setValidators(bytes calldata newValidators) external;

    /// Get the highest validator id for purpose of iterating
    function lastValidatorId() external view returns(uint256);

    /// Get validator pubkey address by validator id
    function validatorAddress(uint256 index) external view returns(address);

    /// Get validator weight by validator address
    function validatorWeight(address addr) external view returns(uint256);

    /// Get validator id by validator pubkey address
    function validatorId(address addr) external view returns(uint256);

    /// Get weight of all registered validators
    function totalWeight() external view returns(uint256);

    /// Get weight necessary to update the state oracle
    function getQuorum() external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IUpdateVerifier","name":"_updateVerifier","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes20","name":"messageHash","type":"bytes20"},{"indexed":false,"internalType":"uint32","name":"chainId","type":"uint32"},{"indexed":false,"internalType":"bytes","name":"signature","type":"bytes"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"Vote","type":"event"},{"inputs":[],"name":"updateVerifier","outputs":[{"internalType":"contract IUpdateVerifier","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes20","name":"messageHash","type":"bytes20"},{"internalType":"uint32","name":"chainId","type":"uint32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"vote","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561000f575f5ffd5b506040516103db3803806103db83398101604081905261002e91610099565b6001600160a01b0381166100885760405162461bcd60e51b815260206004820152601e60248201527f55706461746556657269666965722061646472657373206e6f74207365740000604482015260640160405180910390fd5b6001600160a01b03166080526100c6565b5f602082840312156100a9575f5ffd5b81516001600160a01b03811681146100bf575f5ffd5b9392505050565b6080516102f86100e35f395f8181603d015260a701526102f85ff3fe608060405234801561000f575f5ffd5b5060043610610034575f3560e01c806398887caa14610038578063f5d34d841461007b575b5f5ffd5b61005f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b61008e6100893660046101a0565b610090565b005b6040516314d94b5160e31b81523360048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a6ca5a8890602401602060405180830381865afa1580156100f4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101189190610247565b1161015b5760405162461bcd60e51b815260206004820152600f60248201526e2737ba1030903b30b634b230ba37b960891b604482015260640160405180910390fd5b7fda3bb78b59b5e179128ed5dec56aecf7dd68e8788b47c18c9fdfae242f4f3a55848484843360405161019295949392919061025e565b60405180910390a150505050565b5f5f5f5f606085870312156101b3575f5ffd5b84356bffffffffffffffffffffffff19811681146101cf575f5ffd5b9350602085013563ffffffff811681146101e7575f5ffd5b9250604085013567ffffffffffffffff811115610202575f5ffd5b8501601f81018713610212575f5ffd5b803567ffffffffffffffff811115610228575f5ffd5b876020828401011115610239575f5ffd5b949793965060200194505050565b5f60208284031215610257575f5ffd5b5051919050565b6bffffffffffffffffffffffff198616815263ffffffff8516602082015260806040820152826080820152828460a08301375f81840160a0908101919091526001600160a01b03929092166060820152601f909201601f191690910101939250505056fea264697066735822122058860949e8355113b9d0571d6fbb1ea069891603e8c0eee8f39c287f800b8bce64736f6c634300081b0033000000000000000000000000bcba1f21ca212f63f71536128d9e574dc3ae28d9

Deployed Bytecode

0x608060405234801561000f575f5ffd5b5060043610610034575f3560e01c806398887caa14610038578063f5d34d841461007b575b5f5ffd5b61005f7f000000000000000000000000bcba1f21ca212f63f71536128d9e574dc3ae28d981565b6040516001600160a01b03909116815260200160405180910390f35b61008e6100893660046101a0565b610090565b005b6040516314d94b5160e31b81523360048201525f907f000000000000000000000000bcba1f21ca212f63f71536128d9e574dc3ae28d96001600160a01b03169063a6ca5a8890602401602060405180830381865afa1580156100f4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101189190610247565b1161015b5760405162461bcd60e51b815260206004820152600f60248201526e2737ba1030903b30b634b230ba37b960891b604482015260640160405180910390fd5b7fda3bb78b59b5e179128ed5dec56aecf7dd68e8788b47c18c9fdfae242f4f3a55848484843360405161019295949392919061025e565b60405180910390a150505050565b5f5f5f5f606085870312156101b3575f5ffd5b84356bffffffffffffffffffffffff19811681146101cf575f5ffd5b9350602085013563ffffffff811681146101e7575f5ffd5b9250604085013567ffffffffffffffff811115610202575f5ffd5b8501601f81018713610212575f5ffd5b803567ffffffffffffffff811115610228575f5ffd5b876020828401011115610239575f5ffd5b949793965060200194505050565b5f60208284031215610257575f5ffd5b5051919050565b6bffffffffffffffffffffffff198616815263ffffffff8516602082015260806040820152826080820152828460a08301375f81840160a0908101919091526001600160a01b03929092166060820152601f909201601f191690910101939250505056fea264697066735822122058860949e8355113b9d0571d6fbb1ea069891603e8c0eee8f39c287f800b8bce64736f6c634300081b0033

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

000000000000000000000000bcba1f21ca212f63f71536128d9e574dc3ae28d9

-----Decoded View---------------
Arg [0] : _updateVerifier (address): 0xBCBA1f21ca212F63f71536128d9e574DC3AE28d9

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000bcba1f21ca212f63f71536128d9e574dc3ae28d9


Block Transaction 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
[ 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.