Skip to content

Commit

Permalink
chore(docs): auto commit solidity docs
Browse files Browse the repository at this point in the history
  • Loading branch information
d1onys1us authored and github-actions[bot] committed Dec 27, 2022
1 parent a7d0bf2 commit a7aca0e
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 3 deletions.
105 changes: 105 additions & 0 deletions packages/website/docs/smart-contracts/L1/LibData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
## LibData

### BlockMetadata

```solidity
struct BlockMetadata {
uint256 id;
uint256 l1Height;
bytes32 l1Hash;
address beneficiary;
bytes32 txListHash;
bytes32 mixHash;
bytes extraData;
uint64 gasLimit;
uint64 timestamp;
uint64 commitHeight;
uint64 commitSlot;
}
```

### ProposedBlock

```solidity
struct ProposedBlock {
bytes32 metaHash;
address proposer;
uint64 proposedAt;
}
```

### ForkChoice

```solidity
struct ForkChoice {
bytes32 blockHash;
uint64 provenAt;
address[] provers;
}
```

### State

```solidity
struct State {
mapping(uint256 => bytes32) l2Hashes;
mapping(uint256 => struct LibData.ProposedBlock) proposedBlocks;
mapping(uint256 => mapping(bytes32 => struct LibData.ForkChoice)) forkChoices;
mapping(address => mapping(uint256 => bytes32)) commits;
uint64 genesisHeight;
uint64 genesisTimestamp;
uint64 __reservedA1;
uint64 statusBits;
uint64 nextBlockId;
uint64 lastProposedAt;
uint64 avgBlockTime;
uint64 __avgGasLimit;
uint64 latestVerifiedHeight;
uint64 latestVerifiedId;
uint64 avgProofTime;
uint64 __reservedC1;
uint256[42] __gap;
}
```

### TentativeState

```solidity
struct TentativeState {
mapping(address => bool) proposers;
mapping(address => bool) provers;
bool whitelistProposers;
bool whitelistProvers;
uint256[46] __gap;
}
```

### saveProposedBlock

```solidity
function saveProposedBlock(struct LibData.State state, uint256 id, struct LibData.ProposedBlock blk) internal
```

### getProposedBlock

```solidity
function getProposedBlock(struct LibData.State state, uint256 id) internal view returns (struct LibData.ProposedBlock)
```

### getL2BlockHash

```solidity
function getL2BlockHash(struct LibData.State state, uint256 number) internal view returns (bytes32)
```

### getStateVariables

```solidity
function getStateVariables(struct LibData.State state) internal view returns (uint64 genesisHeight, uint64 latestVerifiedHeight, uint64 latestVerifiedId, uint64 nextBlockId)
```

### hashMetadata

```solidity
function hashMetadata(struct LibData.BlockMetadata meta) internal pure returns (bytes32)
```
6 changes: 6 additions & 0 deletions packages/website/docs/smart-contracts/L1/TaikoL1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ struct LibData.State state
struct LibData.TentativeState tentative
```

### \_\_gap

```solidity
uint256[50] __gap
```

### init

```solidity
Expand Down
5 changes: 5 additions & 0 deletions packages/website/docs/smart-contracts/L1/TkoToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

_This is Taiko's governance and fee token._

### \_\_gap

```solidity
uint256[50] __gap
```

### Mint

Expand Down
18 changes: 18 additions & 0 deletions packages/website/docs/smart-contracts/L2/TaikoL2.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ bytes32 publicInputHash
bytes32 latestSyncedHeader
```

### \_\_gap

```solidity
uint256[46] __gap
```

### BlockInvalidated

```solidity
Expand Down Expand Up @@ -95,3 +101,15 @@ function getBlockHash(uint256 number) public view returns (bytes32)
```solidity
function getConstants() public pure returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256)
```

### \_checkPublicInputs

```solidity
function _checkPublicInputs() private
```

### \_hashPublicInputs

```solidity
function _hashPublicInputs(uint256 chainId, uint256 number, uint256 baseFee, bytes32[255] ancestors) private pure returns (bytes32)
```
6 changes: 6 additions & 0 deletions packages/website/docs/smart-contracts/bridge/Bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ _The code hash for the same address on L1 and L2 may be different._
struct LibBridgeData.State state
```

### \_\_gap

```solidity
uint256[50] __gap
```

### MessageStatusChanged

```solidity
Expand Down
6 changes: 6 additions & 0 deletions packages/website/docs/smart-contracts/bridge/BridgedERC20.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ address srcToken
uint256 srcChainId
```

### \_\_gap

```solidity
uint256[48] __gap
```

### BridgeMint

```solidity
Expand Down
2 changes: 0 additions & 2 deletions packages/website/docs/smart-contracts/bridge/IBridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ struct Message {
bytes data;
string memo;
}
```

### Context
Expand All @@ -33,7 +32,6 @@ struct Context {
address sender;
uint256 srcChainId;
}
```

### SignalSent
Expand Down
1 change: 0 additions & 1 deletion packages/website/docs/smart-contracts/bridge/TokenVault.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ struct CanonicalERC20 {
string symbol;
string name;
}
```

### isBridgedToken
Expand Down

0 comments on commit a7aca0e

Please sign in to comment.