Module zenith_types::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§
- Custom error with signature
BadSignature(address)and selector0x9a7d38d9. - Event with signature
BlockSubmitted(address,uint256,uint256,address,bytes32)and selector0xfe642e465ceaeb1c7f4cedaee76e84b12970fe1546683f8758525b3a0e2b4442. - Custom error with signature
IncorrectHostBlock()and selector0xb2d975db. - Custom error with signature
OneRollupBlockPerHostBlock()and selector0x2ce0494b. - Custom error with signature
OnlySequencerAdmin()and selector0x49a95bf0. - Event with signature
SequencerSet(address,bool)and selector0xeb12a9a53eec138c91b27b4f912a257bd690c18fc8bde744be92a0365eb9b87e. - A
Zenithinstance. - Function with signature
addSequencer(address)and selector0x8a336231. - Container type for the return parameters of the
addSequencer(address)function. - Function with signature
blockCommitment((uint256,uint256,uint256,address,bytes32))and selector0x8635c102. - Container type for the return parameters of the
blockCommitment((uint256,uint256,uint256,address,bytes32))function. - Constructor`.
- Function with signature
deployBlockNumber()and selector0x206288d3. - Container type for the return parameters of the
deployBlockNumber()function. - Function with signature
isSequencer(address)and selector0x6d46e987. - Container type for the return parameters of the
isSequencer(address)function. - Function with signature
lastSubmittedAtBlock(uint256)and selector0x7e82bb01. - Container type for the return parameters of the
lastSubmittedAtBlock(uint256)function. - Function with signature
removeSequencer(address)and selector0x6989ca7c. - Container type for the return parameters of the
removeSequencer(address)function. - Function with signature
sequencerAdmin()and selector0xf9060fee. - Container type for the return parameters of the
sequencerAdmin()function. - Function with signature
submitBlock((uint256,uint256,uint256,address,bytes32),uint8,bytes32,bytes32,bytes)and selector0x88b673d3. - Container type for the return parameters of the
submitBlock((uint256,uint256,uint256,address,bytes32),uint8,bytes32,bytes32,bytes)function.
Enums§
- Container for all the
Zenithfunction calls. - Container for all the
Zenithcustom errors. - Container for all the
Zenithevents.
Functions§
- Creates a new wrapper around an on-chain
Zenithcontract instance.