Expand description
§What to re-export, what to hide?
- export contract struct itself, but try to avoid export instance type (instead, use ::new() to get a handle)
- avoid exporting
xxCall
andxxReturn
types, they usually can be converted/transmuted from existing struct - Event types should be exported
- structs should be exported and renamed with
xxSol
suffix to avoid confusion with other rust types- see module doc for more explanation on types duplication issue in alloy
Generated by the following Solidity interface…
library BN254 {
type BaseField is uint256;
type ScalarField is uint256;
struct G1Point {
BaseField x;
BaseField y;
}
}
library IPlonkVerifier {
struct PlonkProof {
BN254.G1Point wire0;
BN254.G1Point wire1;
BN254.G1Point wire2;
BN254.G1Point wire3;
BN254.G1Point wire4;
BN254.G1Point prodPerm;
BN254.G1Point split0;
BN254.G1Point split1;
BN254.G1Point split2;
BN254.G1Point split3;
BN254.G1Point split4;
BN254.G1Point zeta;
BN254.G1Point zetaOmega;
BN254.ScalarField wireEval0;
BN254.ScalarField wireEval1;
BN254.ScalarField wireEval2;
BN254.ScalarField wireEval3;
BN254.ScalarField wireEval4;
BN254.ScalarField sigmaEval0;
BN254.ScalarField sigmaEval1;
BN254.ScalarField sigmaEval2;
BN254.ScalarField sigmaEval3;
BN254.ScalarField prodPermZetaOmegaEval;
}
struct VerifyingKey {
uint256 domainSize;
uint256 numInputs;
BN254.G1Point sigma0;
BN254.G1Point sigma1;
BN254.G1Point sigma2;
BN254.G1Point sigma3;
BN254.G1Point sigma4;
BN254.G1Point q1;
BN254.G1Point q2;
BN254.G1Point q3;
BN254.G1Point q4;
BN254.G1Point qM12;
BN254.G1Point qM34;
BN254.G1Point qO;
BN254.G1Point qC;
BN254.G1Point qH1;
BN254.G1Point qH2;
BN254.G1Point qH3;
BN254.G1Point qH4;
BN254.G1Point qEcc;
bytes32 g2LSB;
bytes32 g2MSB;
}
}
library LightClient {
struct LightClientState {
uint64 viewNum;
uint64 blockHeight;
BN254.ScalarField blockCommRoot;
}
struct StakeTableState {
uint256 threshold;
BN254.ScalarField blsKeyComm;
BN254.ScalarField schnorrKeyComm;
BN254.ScalarField amountComm;
}
struct StateHistoryCommitment {
uint64 l1BlockHeight;
uint64 l1BlockTimestamp;
uint64 hotShotBlockHeight;
BN254.ScalarField hotShotBlockCommRoot;
}
}
interface LightClientMock {
error AddressEmptyCode(address target);
error ERC1967InvalidImplementation(address implementation);
error ERC1967NonPayable();
error FailedInnerCall();
error InsufficientSnapshotHistory();
error InvalidAddress();
error InvalidArgs();
error InvalidHotShotBlockForCommitmentCheck();
error InvalidInitialization();
error InvalidMaxStateHistory();
error InvalidProof();
error NoChangeRequired();
error NotInitializing();
error OutdatedState();
error OwnableInvalidOwner(address owner);
error OwnableUnauthorizedAccount(address account);
error ProverNotPermissioned();
error UUPSUnauthorizedCallContext();
error UUPSUnsupportedProxiableUUID(bytes32 slot);
error WrongStakeTableUsed();
event Initialized(uint64 version);
event NewState(uint64 indexed viewNum, uint64 indexed blockHeight, BN254.ScalarField blockCommRoot);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event PermissionedProverNotRequired();
event PermissionedProverRequired(address permissionedProver);
event Upgrade(address implementation);
event Upgraded(address indexed implementation);
function UPGRADE_INTERFACE_VERSION() external view returns (string memory);
function _getVk() external pure returns (IPlonkVerifier.VerifyingKey memory vk);
function currentBlockNumber() external view returns (uint256);
function disablePermissionedProverMode() external;
function finalizedState() external view returns (uint64 viewNum, uint64 blockHeight, BN254.ScalarField blockCommRoot);
function genesisStakeTableState() external view returns (uint256 threshold, BN254.ScalarField blsKeyComm, BN254.ScalarField schnorrKeyComm, BN254.ScalarField amountComm);
function genesisState() external view returns (uint64 viewNum, uint64 blockHeight, BN254.ScalarField blockCommRoot);
function getHotShotCommitment(uint256 hotShotBlockHeight) external view returns (BN254.ScalarField hotShotBlockCommRoot, uint64 hotshotBlockHeight);
function getStateHistoryCount() external view returns (uint256);
function getVersion() external pure returns (uint8 majorVersion, uint8 minorVersion, uint8 patchVersion);
function initialize(LightClient.LightClientState memory _genesis, LightClient.StakeTableState memory _genesisStakeTableState, uint32 _stateHistoryRetentionPeriod, address owner) external;
function isPermissionedProverEnabled() external view returns (bool);
function lagOverEscapeHatchThreshold(uint256 blockNumber, uint256 threshold) external view returns (bool);
function newFinalizedState(LightClient.LightClientState memory newState, IPlonkVerifier.PlonkProof memory proof) external;
function owner() external view returns (address);
function permissionedProver() external view returns (address);
function proxiableUUID() external view returns (bytes32);
function renounceOwnership() external;
function setFinalizedState(LightClient.LightClientState memory state) external;
function setHotShotDownSince(uint256 l1Height) external;
function setHotShotUp() external;
function setPermissionedProver(address prover) external;
function setStateHistory(LightClient.StateHistoryCommitment[] memory _stateHistoryCommitments) external;
function setstateHistoryRetentionPeriod(uint32 historySeconds) external;
function stateHistoryCommitments(uint256) external view returns (uint64 l1BlockHeight, uint64 l1BlockTimestamp, uint64 hotShotBlockHeight, BN254.ScalarField hotShotBlockCommRoot);
function stateHistoryFirstIndex() external view returns (uint64);
function stateHistoryRetentionPeriod() external view returns (uint32);
function transferOwnership(address newOwner) external;
function upgradeToAndCall(address newImplementation, bytes memory data) external payable;
}
…which was generated by the following JSON ABI:
[
{
"type": "function",
"name": "UPGRADE_INTERFACE_VERSION",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_getVk",
"inputs": [],
"outputs": [
{
"name": "vk",
"type": "tuple",
"internalType": "struct IPlonkVerifier.VerifyingKey",
"components": [
{
"name": "domainSize",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "numInputs",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "sigma0",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "sigma1",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "sigma2",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "sigma3",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "sigma4",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "q1",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "q2",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "q3",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "q4",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "qM12",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "qM34",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "qO",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "qC",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "qH1",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "qH2",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "qH3",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "qH4",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "qEcc",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "g2LSB",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "g2MSB",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "currentBlockNumber",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "disablePermissionedProverMode",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "finalizedState",
"inputs": [],
"outputs": [
{
"name": "viewNum",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockHeight",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockCommRoot",
"type": "uint256",
"internalType": "BN254.ScalarField"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "genesisStakeTableState",
"inputs": [],
"outputs": [
{
"name": "threshold",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "blsKeyComm",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "schnorrKeyComm",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "amountComm",
"type": "uint256",
"internalType": "BN254.ScalarField"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "genesisState",
"inputs": [],
"outputs": [
{
"name": "viewNum",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockHeight",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockCommRoot",
"type": "uint256",
"internalType": "BN254.ScalarField"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getHotShotCommitment",
"inputs": [
{
"name": "hotShotBlockHeight",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "hotShotBlockCommRoot",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "hotshotBlockHeight",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getStateHistoryCount",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getVersion",
"inputs": [],
"outputs": [
{
"name": "majorVersion",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "minorVersion",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "patchVersion",
"type": "uint8",
"internalType": "uint8"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "initialize",
"inputs": [
{
"name": "_genesis",
"type": "tuple",
"internalType": "struct LightClient.LightClientState",
"components": [
{
"name": "viewNum",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockHeight",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockCommRoot",
"type": "uint256",
"internalType": "BN254.ScalarField"
}
]
},
{
"name": "_genesisStakeTableState",
"type": "tuple",
"internalType": "struct LightClient.StakeTableState",
"components": [
{
"name": "threshold",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "blsKeyComm",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "schnorrKeyComm",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "amountComm",
"type": "uint256",
"internalType": "BN254.ScalarField"
}
]
},
{
"name": "_stateHistoryRetentionPeriod",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "owner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "isPermissionedProverEnabled",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "lagOverEscapeHatchThreshold",
"inputs": [
{
"name": "blockNumber",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "threshold",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "newFinalizedState",
"inputs": [
{
"name": "newState",
"type": "tuple",
"internalType": "struct LightClient.LightClientState",
"components": [
{
"name": "viewNum",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockHeight",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockCommRoot",
"type": "uint256",
"internalType": "BN254.ScalarField"
}
]
},
{
"name": "proof",
"type": "tuple",
"internalType": "struct IPlonkVerifier.PlonkProof",
"components": [
{
"name": "wire0",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "wire1",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "wire2",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "wire3",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "wire4",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "prodPerm",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "split0",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "split1",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "split2",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "split3",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "split4",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "zeta",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "zetaOmega",
"type": "tuple",
"internalType": "struct BN254.G1Point",
"components": [
{
"name": "x",
"type": "uint256",
"internalType": "BN254.BaseField"
},
{
"name": "y",
"type": "uint256",
"internalType": "BN254.BaseField"
}
]
},
{
"name": "wireEval0",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "wireEval1",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "wireEval2",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "wireEval3",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "wireEval4",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "sigmaEval0",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "sigmaEval1",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "sigmaEval2",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "sigmaEval3",
"type": "uint256",
"internalType": "BN254.ScalarField"
},
{
"name": "prodPermZetaOmegaEval",
"type": "uint256",
"internalType": "BN254.ScalarField"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "permissionedProver",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "proxiableUUID",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setFinalizedState",
"inputs": [
{
"name": "state",
"type": "tuple",
"internalType": "struct LightClient.LightClientState",
"components": [
{
"name": "viewNum",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockHeight",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "blockCommRoot",
"type": "uint256",
"internalType": "BN254.ScalarField"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setHotShotDownSince",
"inputs": [
{
"name": "l1Height",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setHotShotUp",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setPermissionedProver",
"inputs": [
{
"name": "prover",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setStateHistory",
"inputs": [
{
"name": "_stateHistoryCommitments",
"type": "tuple[]",
"internalType": "struct LightClient.StateHistoryCommitment[]",
"components": [
{
"name": "l1BlockHeight",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "l1BlockTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "hotShotBlockHeight",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "hotShotBlockCommRoot",
"type": "uint256",
"internalType": "BN254.ScalarField"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setstateHistoryRetentionPeriod",
"inputs": [
{
"name": "historySeconds",
"type": "uint32",
"internalType": "uint32"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "stateHistoryCommitments",
"inputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "l1BlockHeight",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "l1BlockTimestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "hotShotBlockHeight",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "hotShotBlockCommRoot",
"type": "uint256",
"internalType": "BN254.ScalarField"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "stateHistoryFirstIndex",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "stateHistoryRetentionPeriod",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint32",
"internalType": "uint32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "upgradeToAndCall",
"inputs": [
{
"name": "newImplementation",
"type": "address",
"internalType": "address"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "NewState",
"inputs": [
{
"name": "viewNum",
"type": "uint64",
"indexed": true,
"internalType": "uint64"
},
{
"name": "blockHeight",
"type": "uint64",
"indexed": true,
"internalType": "uint64"
},
{
"name": "blockCommRoot",
"type": "uint256",
"indexed": false,
"internalType": "BN254.ScalarField"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "PermissionedProverNotRequired",
"inputs": [],
"anonymous": false
},
{
"type": "event",
"name": "PermissionedProverRequired",
"inputs": [
{
"name": "permissionedProver",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Upgrade",
"inputs": [
{
"name": "implementation",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Upgraded",
"inputs": [
{
"name": "implementation",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "error",
"name": "AddressEmptyCode",
"inputs": [
{
"name": "target",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC1967InvalidImplementation",
"inputs": [
{
"name": "implementation",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC1967NonPayable",
"inputs": []
},
{
"type": "error",
"name": "FailedInnerCall",
"inputs": []
},
{
"type": "error",
"name": "InsufficientSnapshotHistory",
"inputs": []
},
{
"type": "error",
"name": "InvalidAddress",
"inputs": []
},
{
"type": "error",
"name": "InvalidArgs",
"inputs": []
},
{
"type": "error",
"name": "InvalidHotShotBlockForCommitmentCheck",
"inputs": []
},
{
"type": "error",
"name": "InvalidInitialization",
"inputs": []
},
{
"type": "error",
"name": "InvalidMaxStateHistory",
"inputs": []
},
{
"type": "error",
"name": "InvalidProof",
"inputs": []
},
{
"type": "error",
"name": "NoChangeRequired",
"inputs": []
},
{
"type": "error",
"name": "NotInitializing",
"inputs": []
},
{
"type": "error",
"name": "OutdatedState",
"inputs": []
},
{
"type": "error",
"name": "OwnableInvalidOwner",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "OwnableUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ProverNotPermissioned",
"inputs": []
},
{
"type": "error",
"name": "UUPSUnauthorizedCallContext",
"inputs": []
},
{
"type": "error",
"name": "UUPSUnsupportedProxiableUUID",
"inputs": [
{
"name": "slot",
"type": "bytes32",
"internalType": "bytes32"
}
]
},
{
"type": "error",
"name": "WrongStakeTableUsed",
"inputs": []
}
]
Structs§
- Address
Empty Code - Custom error with signature
AddressEmptyCode(address)
and selector0x9996b315
.solidity error AddressEmptyCode(address target);
- ERC1967
Invalid Implementation - Custom error with signature
ERC1967InvalidImplementation(address)
and selector0x4c9c8ce3
.solidity error ERC1967InvalidImplementation(address implementation);
- ERC1967
NonPayable - Custom error with signature
ERC1967NonPayable()
and selector0xb398979f
.solidity error ERC1967NonPayable();
- Failed
Inner Call - Custom error with signature
FailedInnerCall()
and selector0x1425ea42
.solidity error FailedInnerCall();
- Initialized
- Event with signature
Initialized(uint64)
and selector0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2
.solidity event Initialized(uint64 version);
- Insufficient
Snapshot History - Custom error with signature
InsufficientSnapshotHistory()
and selector0xb0b43877
.solidity error InsufficientSnapshotHistory();
- Invalid
Address - Custom error with signature
InvalidAddress()
and selector0xe6c4247b
.solidity error InvalidAddress();
- Invalid
Args - Custom error with signature
InvalidArgs()
and selector0xa1ba07ee
.solidity error InvalidArgs();
- Invalid
HotShot Block ForCommitment Check - Custom error with signature
InvalidHotShotBlockForCommitmentCheck()
and selector0x615a9264
.solidity error InvalidHotShotBlockForCommitmentCheck();
- Invalid
Initialization - Custom error with signature
InvalidInitialization()
and selector0xf92ee8a9
.solidity error InvalidInitialization();
- Invalid
MaxState History - Custom error with signature
InvalidMaxStateHistory()
and selector0xf4a0eee0
.solidity error InvalidMaxStateHistory();
- Invalid
Proof - Custom error with signature
InvalidProof()
and selector0x09bde339
.solidity error InvalidProof();
- Light
Client Mock Instance - A
LightClientMock
instance. - NewState
- Event with signature
NewState(uint64,uint64,uint256)
and selector0xa04a773924505a418564363725f56832f5772e6b8d0dbd6efce724dfe803dae6
.solidity event NewState(uint64 indexed viewNum, uint64 indexed blockHeight, BN254.ScalarField blockCommRoot);
- NoChange
Required - Custom error with signature
NoChangeRequired()
and selector0xa863aec9
.solidity error NoChangeRequired();
- NotInitializing
- Custom error with signature
NotInitializing()
and selector0xd7e6bcf8
.solidity error NotInitializing();
- Outdated
State - Custom error with signature
OutdatedState()
and selector0x051c46ef
.solidity error OutdatedState();
- Ownable
Invalid Owner - Custom error with signature
OwnableInvalidOwner(address)
and selector0x1e4fbdf7
.solidity error OwnableInvalidOwner(address owner);
- Ownable
Unauthorized Account - Custom error with signature
OwnableUnauthorizedAccount(address)
and selector0x118cdaa7
.solidity error OwnableUnauthorizedAccount(address account);
- Ownership
Transferred - Event with signature
OwnershipTransferred(address,address)
and selector0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0
.solidity event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
- Permissioned
Prover NotRequired - Event with signature
PermissionedProverNotRequired()
and selector0x9a5f57de856dd668c54dd95e5c55df93432171cbca49a8776d5620ea59c02450
.solidity event PermissionedProverNotRequired();
- Permissioned
Prover Required - Event with signature
PermissionedProverRequired(address)
and selector0x8017bb887fdf8fca4314a9d40f6e73b3b81002d67e5cfa85d88173af6aa46072
.solidity event PermissionedProverRequired(address permissionedProver);
- Prover
NotPermissioned - Custom error with signature
ProverNotPermissioned()
and selector0xa3a64780
.solidity error ProverNotPermissioned();
- UPGRADE_
INTERFACE_ VERSION Call - Function with signature
UPGRADE_INTERFACE_VERSION()
and selector0xad3cb1cc
.solidity function UPGRADE_INTERFACE_VERSION() external view returns (string memory);
- UPGRADE_
INTERFACE_ VERSION Return - Container type for the return parameters of the
UPGRADE_INTERFACE_VERSION()
function. - UUPS
Unauthorized Call Context - Custom error with signature
UUPSUnauthorizedCallContext()
and selector0xe07c8dba
.solidity error UUPSUnauthorizedCallContext();
- UUPS
Unsupported ProxiableUUID - Custom error with signature
UUPSUnsupportedProxiableUUID(bytes32)
and selector0xaa1d49a4
.solidity error UUPSUnsupportedProxiableUUID(bytes32 slot);
- Upgrade
- Event with signature
Upgrade(address)
and selector0xf78721226efe9a1bb678189a16d1554928b9f2192e2cb93eeda83b79fa40007d
.solidity event Upgrade(address implementation);
- Upgraded
- Event with signature
Upgraded(address)
and selector0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b
.solidity event Upgraded(address indexed implementation);
- Wrong
Stake Table Used - Custom error with signature
WrongStakeTableUsed()
and selector0x51618089
.solidity error WrongStakeTableUsed();
- _get
VkCall - Function with signature
_getVk()
and selector0x12173c2c
.solidity function _getVk() external pure returns (IPlonkVerifier.VerifyingKey memory vk);
- _get
VkReturn - Container type for the return parameters of the
_getVk()
function. - current
Block Number Call - Function with signature
currentBlockNumber()
and selector0x378ec23b
.solidity function currentBlockNumber() external view returns (uint256);
- current
Block Number Return - Container type for the return parameters of the
currentBlockNumber()
function. - disable
Permissioned Prover Mode Call - Function with signature
disablePermissionedProverMode()
and selector0x69cc6a04
.solidity function disablePermissionedProverMode() external;
- disable
Permissioned Prover Mode Return - Container type for the return parameters of the
disablePermissionedProverMode()
function. - finalized
State Call - Function with signature
finalizedState()
and selector0x9fdb54a7
.solidity function finalizedState() external view returns (uint64 viewNum, uint64 blockHeight, BN254.ScalarField blockCommRoot);
- finalized
State Return - Container type for the return parameters of the
finalizedState()
function. - genesis
Stake Table State Call - Function with signature
genesisStakeTableState()
and selector0x426d3194
.solidity function genesisStakeTableState() external view returns (uint256 threshold, BN254.ScalarField blsKeyComm, BN254.ScalarField schnorrKeyComm, BN254.ScalarField amountComm);
- genesis
Stake Table State Return - Container type for the return parameters of the
genesisStakeTableState()
function. - genesis
State Call - Function with signature
genesisState()
and selector0xd24d933d
.solidity function genesisState() external view returns (uint64 viewNum, uint64 blockHeight, BN254.ScalarField blockCommRoot);
- genesis
State Return - Container type for the return parameters of the
genesisState()
function. - getHot
Shot Commitment Call - Function with signature
getHotShotCommitment(uint256)
and selector0x8584d23f
.solidity function getHotShotCommitment(uint256 hotShotBlockHeight) external view returns (BN254.ScalarField hotShotBlockCommRoot, uint64 hotshotBlockHeight);
- getHot
Shot Commitment Return - Container type for the return parameters of the
getHotShotCommitment(uint256)
function. - getState
History Count Call - Function with signature
getStateHistoryCount()
and selector0xf9e50d19
.solidity function getStateHistoryCount() external view returns (uint256);
- getState
History Count Return - Container type for the return parameters of the
getStateHistoryCount()
function. - getVersion
Call - Function with signature
getVersion()
and selector0x0d8e6e2c
.solidity function getVersion() external pure returns (uint8 majorVersion, uint8 minorVersion, uint8 patchVersion);
- getVersion
Return - Container type for the return parameters of the
getVersion()
function. - initialize
Call - Function with signature
initialize((uint64,uint64,uint256),(uint256,uint256,uint256,uint256),uint32,address)
and selector0x9baa3cc9
.solidity function initialize(LightClient.LightClientState memory _genesis, LightClient.StakeTableState memory _genesisStakeTableState, uint32 _stateHistoryRetentionPeriod, address owner) external;
- initialize
Return - Container type for the return parameters of the
initialize((uint64,uint64,uint256),(uint256,uint256,uint256,uint256),uint32,address)
function. - isPermissioned
Prover Enabled Call - Function with signature
isPermissionedProverEnabled()
and selector0x826e41fc
.solidity function isPermissionedProverEnabled() external view returns (bool);
- isPermissioned
Prover Enabled Return - Container type for the return parameters of the
isPermissionedProverEnabled()
function. - lagOver
Escape Hatch Threshold Call - Function with signature
lagOverEscapeHatchThreshold(uint256,uint256)
and selector0xe0303301
.solidity function lagOverEscapeHatchThreshold(uint256 blockNumber, uint256 threshold) external view returns (bool);
- lagOver
Escape Hatch Threshold Return - Container type for the return parameters of the
lagOverEscapeHatchThreshold(uint256,uint256)
function. - newFinalized
State Call - Function with signature
newFinalizedState((uint64,uint64,uint256),((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256))
and selector0x2063d4f7
.solidity function newFinalizedState(LightClient.LightClientState memory newState, IPlonkVerifier.PlonkProof memory proof) external;
- newFinalized
State Return - Container type for the return parameters of the
newFinalizedState((uint64,uint64,uint256),((uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),(uint256,uint256),uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256))
function. - owner
Call - Function with signature
owner()
and selector0x8da5cb5b
.solidity function owner() external view returns (address);
- owner
Return - Container type for the return parameters of the
owner()
function. - permissioned
Prover Call - Function with signature
permissionedProver()
and selector0x313df7b1
.solidity function permissionedProver() external view returns (address);
- permissioned
Prover Return - Container type for the return parameters of the
permissionedProver()
function. - proxiableUUID
Call - Function with signature
proxiableUUID()
and selector0x52d1902d
.solidity function proxiableUUID() external view returns (bytes32);
- proxiableUUID
Return - Container type for the return parameters of the
proxiableUUID()
function. - renounce
Ownership Call - Function with signature
renounceOwnership()
and selector0x715018a6
.solidity function renounceOwnership() external;
- renounce
Ownership Return - Container type for the return parameters of the
renounceOwnership()
function. - setFinalized
State Call - Function with signature
setFinalizedState((uint64,uint64,uint256))
and selector0xb5adea3c
.solidity function setFinalizedState(LightClient.LightClientState memory state) external;
- setFinalized
State Return - Container type for the return parameters of the
setFinalizedState((uint64,uint64,uint256))
function. - setHot
Shot Down Since Call - Function with signature
setHotShotDownSince(uint256)
and selector0x2d52aad6
.solidity function setHotShotDownSince(uint256 l1Height) external;
- setHot
Shot Down Since Return - Container type for the return parameters of the
setHotShotDownSince(uint256)
function. - setHot
Shot UpCall - Function with signature
setHotShotUp()
and selector0xc8e5e498
.solidity function setHotShotUp() external;
- setHot
Shot UpReturn - Container type for the return parameters of the
setHotShotUp()
function. - setPermissioned
Prover Call - Function with signature
setPermissionedProver(address)
and selector0x013fa5fc
.solidity function setPermissionedProver(address prover) external;
- setPermissioned
Prover Return - Container type for the return parameters of the
setPermissionedProver(address)
function. - setState
History Call - Function with signature
setStateHistory((uint64,uint64,uint64,uint256)[])
and selector0xf5676160
.solidity function setStateHistory(LightClient.StateHistoryCommitment[] memory _stateHistoryCommitments) external;
- setState
History Return - Container type for the return parameters of the
setStateHistory((uint64,uint64,uint64,uint256)[])
function. - setstate
History Retention Period Call - Function with signature
setstateHistoryRetentionPeriod(uint32)
and selector0x96c1ca61
.solidity function setstateHistoryRetentionPeriod(uint32 historySeconds) external;
- setstate
History Retention Period Return - Container type for the return parameters of the
setstateHistoryRetentionPeriod(uint32)
function. - state
History Commitments Call - Function with signature
stateHistoryCommitments(uint256)
and selector0x02b592f3
.solidity function stateHistoryCommitments(uint256) external view returns (uint64 l1BlockHeight, uint64 l1BlockTimestamp, uint64 hotShotBlockHeight, BN254.ScalarField hotShotBlockCommRoot);
- state
History Commitments Return - Container type for the return parameters of the
stateHistoryCommitments(uint256)
function. - state
History First Index Call - Function with signature
stateHistoryFirstIndex()
and selector0x2f79889d
.solidity function stateHistoryFirstIndex() external view returns (uint64);
- state
History First Index Return - Container type for the return parameters of the
stateHistoryFirstIndex()
function. - state
History Retention Period Call - Function with signature
stateHistoryRetentionPeriod()
and selector0xc23b9e9e
.solidity function stateHistoryRetentionPeriod() external view returns (uint32);
- state
History Retention Period Return - Container type for the return parameters of the
stateHistoryRetentionPeriod()
function. - transfer
Ownership Call - Function with signature
transferOwnership(address)
and selector0xf2fde38b
.solidity function transferOwnership(address newOwner) external;
- transfer
Ownership Return - Container type for the return parameters of the
transferOwnership(address)
function. - upgrade
ToAnd Call Call - Function with signature
upgradeToAndCall(address,bytes)
and selector0x4f1ef286
.solidity function upgradeToAndCall(address newImplementation, bytes memory data) external payable;
- upgrade
ToAnd Call Return - Container type for the return parameters of the
upgradeToAndCall(address,bytes)
function.
Enums§
- Light
Client Mock Calls - Container for all the
LightClientMock
function calls. - Light
Client Mock Errors - Container for all the
LightClientMock
custom errors. - Light
Client Mock Events - Container for all the
LightClientMock
events.
Statics§
- BYTECODE
- The creation / init bytecode of the contract.
- DEPLOYED_
BYTECODE - The runtime bytecode of the contract, as deployed on the network.
Functions§
- deploy
- Deploys this contract using the given
provider
and constructor arguments, if any. - deploy_
builder - Creates a
RawCallBuilder
for deploying this contract using the givenprovider
and constructor arguments, if any. - new
- Creates a new wrapper around an on-chain
LightClientMock
contract instance.