Module Zenith

Source
Expand description

Generated by the following Solidity interface…

interface Zenith {
    struct BlockHeader {
        uint256 rollupChainId;
        uint256 hostBlockNumber;
        uint256 gasLimit;
        address rewardAddress;
        bytes32 blockDataHash;
    }

    error BadSignature(address derivedSequencer);
    error IncorrectHostBlock();
    error OneRollupBlockPerHostBlock();
    error OnlySequencerAdmin();

    event BlockSubmitted(address indexed sequencer, uint256 indexed rollupChainId, uint256 gasLimit, address rewardAddress, bytes32 blockDataHash);
    event SequencerSet(address indexed sequencer, bool indexed permissioned);

    constructor(address _sequencerAdmin);

    function addSequencer(address sequencer) external;
    function blockCommitment(BlockHeader memory header) external view returns (bytes32 commit);
    function deployBlockNumber() external view returns (uint256);
    function isSequencer(address) external view returns (bool);
    function lastSubmittedAtBlock(uint256) external view returns (uint256);
    function removeSequencer(address sequencer) external;
    function sequencerAdmin() external view returns (address);
    function submitBlock(BlockHeader memory header, uint8 v, bytes32 r, bytes32 s, bytes memory) external;
}

…which was generated by the following JSON ABI:

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_sequencerAdmin",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "addSequencer",
    "inputs": [
      {
        "name": "sequencer",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "blockCommitment",
    "inputs": [
      {
        "name": "header",
        "type": "tuple",
        "internalType": "struct Zenith.BlockHeader",
        "components": [
          {
            "name": "rollupChainId",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hostBlockNumber",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "gasLimit",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "rewardAddress",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "blockDataHash",
            "type": "bytes32",
            "internalType": "bytes32"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "commit",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "deployBlockNumber",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isSequencer",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "lastSubmittedAtBlock",
    "inputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "removeSequencer",
    "inputs": [
      {
        "name": "sequencer",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "sequencerAdmin",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "submitBlock",
    "inputs": [
      {
        "name": "header",
        "type": "tuple",
        "internalType": "struct Zenith.BlockHeader",
        "components": [
          {
            "name": "rollupChainId",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "hostBlockNumber",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "gasLimit",
            "type": "uint256",
            "internalType": "uint256"
          },
          {
            "name": "rewardAddress",
            "type": "address",
            "internalType": "address"
          },
          {
            "name": "blockDataHash",
            "type": "bytes32",
            "internalType": "bytes32"
          }
        ]
      },
      {
        "name": "v",
        "type": "uint8",
        "internalType": "uint8"
      },
      {
        "name": "r",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "s",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "event",
    "name": "BlockSubmitted",
    "inputs": [
      {
        "name": "sequencer",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "rollupChainId",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "gasLimit",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "rewardAddress",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      },
      {
        "name": "blockDataHash",
        "type": "bytes32",
        "indexed": false,
        "internalType": "bytes32"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "SequencerSet",
    "inputs": [
      {
        "name": "sequencer",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "permissioned",
        "type": "bool",
        "indexed": true,
        "internalType": "bool"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "BadSignature",
    "inputs": [
      {
        "name": "derivedSequencer",
        "type": "address",
        "internalType": "address"
      }
    ]
  },
  {
    "type": "error",
    "name": "IncorrectHostBlock",
    "inputs": []
  },
  {
    "type": "error",
    "name": "OneRollupBlockPerHostBlock",
    "inputs": []
  },
  {
    "type": "error",
    "name": "OnlySequencerAdmin",
    "inputs": []
  }
]

Structs§

BadSignature
Custom error with signature BadSignature(address) and selector 0x9a7d38d9.
BlockHeader
BlockSubmitted
Event with signature BlockSubmitted(address,uint256,uint256,address,bytes32) and selector 0xfe642e465ceaeb1c7f4cedaee76e84b12970fe1546683f8758525b3a0e2b4442.
IncorrectHostBlock
Custom error with signature IncorrectHostBlock() and selector 0xb2d975db.
OneRollupBlockPerHostBlock
Custom error with signature OneRollupBlockPerHostBlock() and selector 0x2ce0494b.
OnlySequencerAdmin
Custom error with signature OnlySequencerAdmin() and selector 0x49a95bf0.
SequencerSet
Event with signature SequencerSet(address,bool) and selector 0xeb12a9a53eec138c91b27b4f912a257bd690c18fc8bde744be92a0365eb9b87e.
ZenithInstance
A Zenith instance.
addSequencerCall
Function with signature addSequencer(address) and selector 0x8a336231.
addSequencerReturn
Container type for the return parameters of the addSequencer(address) function.
blockCommitmentCall
Function with signature blockCommitment((uint256,uint256,uint256,address,bytes32)) and selector 0x8635c102.
blockCommitmentReturn
Container type for the return parameters of the blockCommitment((uint256,uint256,uint256,address,bytes32)) function.
constructorCall
Constructor`.
deployBlockNumberCall
Function with signature deployBlockNumber() and selector 0x206288d3.
deployBlockNumberReturn
Container type for the return parameters of the deployBlockNumber() function.
isSequencerCall
Function with signature isSequencer(address) and selector 0x6d46e987.
isSequencerReturn
Container type for the return parameters of the isSequencer(address) function.
lastSubmittedAtBlockCall
Function with signature lastSubmittedAtBlock(uint256) and selector 0x7e82bb01.
lastSubmittedAtBlockReturn
Container type for the return parameters of the lastSubmittedAtBlock(uint256) function.
removeSequencerCall
Function with signature removeSequencer(address) and selector 0x6989ca7c.
removeSequencerReturn
Container type for the return parameters of the removeSequencer(address) function.
sequencerAdminCall
Function with signature sequencerAdmin() and selector 0xf9060fee.
sequencerAdminReturn
Container type for the return parameters of the sequencerAdmin() function.
submitBlockCall
Function with signature submitBlock((uint256,uint256,uint256,address,bytes32),uint8,bytes32,bytes32,bytes) and selector 0x88b673d3.
submitBlockReturn
Container type for the return parameters of the submitBlock((uint256,uint256,uint256,address,bytes32),uint8,bytes32,bytes32,bytes) function.

Enums§

ZenithCalls
Container for all the Zenith function calls.
ZenithErrors
Container for all the Zenith custom errors.
ZenithEvents
Container for all the Zenith events.

Functions§

new
Creates a new wrapper around an on-chain Zenith contract instance.