-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add auto-generated contract documentation
- Loading branch information
1 parent
b94acb5
commit 9e1f827
Showing
23 changed files
with
2,658 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
packages/website/pages/docs/reference/contract-documentation/L1/TaikoConfig.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: TaikoConfig | ||
--- | ||
|
||
## TaikoConfig | ||
|
||
### getConfig | ||
|
||
```solidity | ||
function getConfig() internal pure returns (struct TaikoData.Config) | ||
``` | ||
|
||
#### Return Values | ||
|
||
| Name | Type | Description | | ||
| ---- | ----------------------- | ------------------------------------- | | ||
| [0] | struct TaikoData.Config | config The Taiko configuration object | |
166 changes: 166 additions & 0 deletions
166
packages/website/pages/docs/reference/contract-documentation/L1/TaikoData.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
--- | ||
title: TaikoData | ||
--- | ||
|
||
## TaikoData | ||
|
||
### Config | ||
|
||
```solidity | ||
struct Config { | ||
uint256 chainId; | ||
uint256 maxNumProposedBlocks; | ||
uint256 ringBufferSize; | ||
uint256 maxVerificationsPerTx; | ||
uint64 blockMaxGasLimit; | ||
uint64 maxTransactionsPerBlock; | ||
uint64 maxBytesPerTxList; | ||
uint256 txListCacheExpiry; | ||
uint256 proofCooldownPeriod; | ||
uint256 systemProofCooldownPeriod; | ||
uint256 realProofSkipSize; | ||
uint256 ethDepositGas; | ||
uint256 ethDepositMaxFee; | ||
uint256 ethDepositRingBufferSize; | ||
uint64 ethDepositMinCountPerBlock; | ||
uint64 ethDepositMaxCountPerBlock; | ||
uint96 ethDepositMaxAmount; | ||
uint96 ethDepositMinAmount; | ||
bool relaySignalRoot; | ||
} | ||
``` | ||
|
||
### StateVariables | ||
|
||
```solidity | ||
struct StateVariables { | ||
uint64 blockFee; | ||
uint64 genesisHeight; | ||
uint64 genesisTimestamp; | ||
uint64 numBlocks; | ||
uint64 lastVerifiedBlockId; | ||
uint64 nextEthDepositToProcess; | ||
uint64 numEthDeposits; | ||
} | ||
``` | ||
|
||
### BlockMetadataInput | ||
|
||
```solidity | ||
struct BlockMetadataInput { | ||
bytes32 txListHash; | ||
address beneficiary; | ||
uint32 gasLimit; | ||
uint24 txListByteStart; | ||
uint24 txListByteEnd; | ||
uint8 cacheTxListInfo; | ||
} | ||
``` | ||
|
||
### BlockMetadata | ||
|
||
```solidity | ||
struct BlockMetadata { | ||
uint64 id; | ||
uint64 timestamp; | ||
uint64 l1Height; | ||
bytes32 l1Hash; | ||
bytes32 mixHash; | ||
bytes32 txListHash; | ||
uint24 txListByteStart; | ||
uint24 txListByteEnd; | ||
uint32 gasLimit; | ||
address beneficiary; | ||
address treasury; | ||
struct TaikoData.EthDeposit[] depositsProcessed; | ||
} | ||
``` | ||
|
||
### BlockEvidence | ||
|
||
```solidity | ||
struct BlockEvidence { | ||
bytes32 metaHash; | ||
bytes32 parentHash; | ||
bytes32 blockHash; | ||
bytes32 signalRoot; | ||
bytes32 graffiti; | ||
address prover; | ||
uint32 parentGasUsed; | ||
uint32 gasUsed; | ||
uint16 verifierId; | ||
bytes proof; | ||
} | ||
``` | ||
|
||
### ForkChoice | ||
|
||
```solidity | ||
struct ForkChoice { | ||
bytes32 key; | ||
bytes32 blockHash; | ||
bytes32 signalRoot; | ||
uint64 provenAt; | ||
address prover; | ||
uint32 gasUsed; | ||
} | ||
``` | ||
|
||
### Block | ||
|
||
```solidity | ||
struct Block { | ||
mapping(uint256 => struct TaikoData.ForkChoice) forkChoices; | ||
uint64 blockId; | ||
uint64 proposedAt; | ||
uint24 nextForkChoiceId; | ||
uint24 verifiedForkChoiceId; | ||
bytes32 metaHash; | ||
address proposer; | ||
} | ||
``` | ||
|
||
### TxListInfo | ||
|
||
```solidity | ||
struct TxListInfo { | ||
uint64 validSince; | ||
uint24 size; | ||
} | ||
``` | ||
|
||
### EthDeposit | ||
|
||
```solidity | ||
struct EthDeposit { | ||
address recipient; | ||
uint96 amount; | ||
uint64 id; | ||
} | ||
``` | ||
|
||
### State | ||
|
||
```solidity | ||
struct State { | ||
mapping(uint256 => struct TaikoData.Block) blocks; | ||
mapping(uint256 => mapping(bytes32 => mapping(uint32 => uint256))) forkChoiceIds; | ||
mapping(address => uint256) taikoTokenBalances; | ||
mapping(bytes32 => struct TaikoData.TxListInfo) txListInfo; | ||
mapping(uint256 => uint256) ethDeposits; | ||
uint64 genesisHeight; | ||
uint64 genesisTimestamp; | ||
uint16 __reserved70; | ||
uint48 __reserved71; | ||
uint64 __reserved72; | ||
uint64 __reserved80; | ||
uint64 numEthDeposits; | ||
uint64 numBlocks; | ||
uint64 nextEthDepositToProcess; | ||
uint64 blockFee; | ||
uint64 __reserved90; | ||
uint64 lastVerifiedBlockId; | ||
uint64 __reserved91; | ||
uint256[42] __gap; | ||
} | ||
``` |
131 changes: 131 additions & 0 deletions
131
packages/website/pages/docs/reference/contract-documentation/L1/TaikoErrors.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
--- | ||
title: TaikoErrors | ||
--- | ||
|
||
## TaikoErrors | ||
|
||
### L1_ALREADY_PROVEN | ||
|
||
```solidity | ||
error L1_ALREADY_PROVEN() | ||
``` | ||
|
||
### L1_BLOCK_ID | ||
|
||
```solidity | ||
error L1_BLOCK_ID() | ||
``` | ||
|
||
### L1_EVIDENCE_MISMATCH | ||
|
||
```solidity | ||
error L1_EVIDENCE_MISMATCH(bytes32 expected, bytes32 actual) | ||
``` | ||
|
||
### L1_FORK_CHOICE_NOT_FOUND | ||
|
||
```solidity | ||
error L1_FORK_CHOICE_NOT_FOUND() | ||
``` | ||
|
||
### L1_INVALID_CONFIG | ||
|
||
```solidity | ||
error L1_INVALID_CONFIG() | ||
``` | ||
|
||
### L1_INVALID_ETH_DEPOSIT | ||
|
||
```solidity | ||
error L1_INVALID_ETH_DEPOSIT() | ||
``` | ||
|
||
### L1_INVALID_EVIDENCE | ||
|
||
```solidity | ||
error L1_INVALID_EVIDENCE() | ||
``` | ||
|
||
### L1_INVALID_METADATA | ||
|
||
```solidity | ||
error L1_INVALID_METADATA() | ||
``` | ||
|
||
### L1_INVALID_PARAM | ||
|
||
```solidity | ||
error L1_INVALID_PARAM() | ||
``` | ||
|
||
### L1_INVALID_PROOF | ||
|
||
```solidity | ||
error L1_INVALID_PROOF() | ||
``` | ||
|
||
### L1_INVALID_PROOF_OVERWRITE | ||
|
||
```solidity | ||
error L1_INVALID_PROOF_OVERWRITE() | ||
``` | ||
|
||
### L1_NOT_SPECIAL_PROVER | ||
|
||
```solidity | ||
error L1_NOT_SPECIAL_PROVER() | ||
``` | ||
|
||
### L1_ORACLE_PROVER_DISABLED | ||
|
||
```solidity | ||
error L1_ORACLE_PROVER_DISABLED() | ||
``` | ||
|
||
### L1_SAME_PROOF | ||
|
||
```solidity | ||
error L1_SAME_PROOF() | ||
``` | ||
|
||
### L1_SYSTEM_PROVER_DISABLED | ||
|
||
```solidity | ||
error L1_SYSTEM_PROVER_DISABLED() | ||
``` | ||
|
||
### L1_SYSTEM_PROVER_PROHIBITED | ||
|
||
```solidity | ||
error L1_SYSTEM_PROVER_PROHIBITED() | ||
``` | ||
|
||
### L1_TOO_MANY_BLOCKS | ||
|
||
```solidity | ||
error L1_TOO_MANY_BLOCKS() | ||
``` | ||
|
||
### L1_TX_LIST_NOT_EXIST | ||
|
||
```solidity | ||
error L1_TX_LIST_NOT_EXIST() | ||
``` | ||
|
||
### L1_TX_LIST_HASH | ||
|
||
```solidity | ||
error L1_TX_LIST_HASH() | ||
``` | ||
|
||
### L1_TX_LIST_RANGE | ||
|
||
```solidity | ||
error L1_TX_LIST_RANGE() | ||
``` | ||
|
||
### L1_TX_LIST | ||
|
||
```solidity | ||
error L1_TX_LIST() | ||
``` |
Oops, something went wrong.