Skip to content

Commit

Permalink
Add auto-generated contract documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
d1onys1us authored and github-actions[bot] committed Jul 19, 2023
1 parent b94acb5 commit 9e1f827
Show file tree
Hide file tree
Showing 23 changed files with 2,658 additions and 0 deletions.
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 |
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;
}
```
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()
```
Loading

0 comments on commit 9e1f827

Please sign in to comment.