Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Automate smart contract docgen and PR branch creation into Linea docs repo #446

Merged
merged 18 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
# '!**.md' will not work by itself to exclude *.md files. See https://github.com/orgs/community/discussions/25369
- '**'
- '!**.md'
- '!**.mdx'
- '!**/docs/**'
- '!docs/**'

jobs:
analyze:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ jobs:
filters: |
has-changes-requiring-build:
- '!**/*.md'
- '!**/*.mdx'
- '!**/docs/**'
- '!docs/**'
# Enables us to exclude changes in multiple file types if required
predicate-quantifier: 'every'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run-smc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ on:
- 'testdata/**'
- 'prover/**'
- '!contracts/**/*.md'
- '!contracts/**/*.mdx'
- '!testdata/**/*.md'
- '!prover/**/*.md'
- '!**/docs/**'
push:
branches:
- main
Expand All @@ -17,8 +19,10 @@ on:
- 'testdata/**'
- 'prover/**'
- '!contracts/**/*.md'
- '!contracts/**/*.mdx'
- '!testdata/**/*.md'
- '!prover/**/*.md'
- '!**/docs/**'

env:
GOPROXY: "https://proxy.golang.org"
Expand Down
6 changes: 3 additions & 3 deletions contracts/contracts/lib/SparseMerkleProof.sol
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ library SparseMerkleProof {
/**
* @notice Hash a value using MIMC hash
* @param _input Value to hash
* @return {bytes32} Mimc hash
* @return bytes32 Mimc hash
*/
function mimcHash(bytes calldata _input) external pure returns (bytes32) {
return Mimc.hash(_input);
Expand All @@ -106,7 +106,7 @@ library SparseMerkleProof {
/**
* @notice Hash account value
* @param _value Encoded account value bytes (nonce, balance, storageRoot, mimcCodeHash, keccakCodeHash, codeSize)
* @return {bytes32} Account value hash
* @return bytes32 Account value hash
*/
function hashAccountValue(bytes calldata _value) external pure returns (bytes32) {
Account memory account = _parseAccount(_value);
Expand All @@ -128,7 +128,7 @@ library SparseMerkleProof {
/**
* @notice Hash storage value
* @param _value Encoded storage value bytes
* @return {bytes32} Storage value hash
* @return bytes32 Storage value hash
*/
function hashStorageValue(bytes32 _value) external pure returns (bytes32) {
(bytes32 msb, bytes32 lsb) = _splitBytes32(_value);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## LineaRollup
# `LineaRollup`

### CONTRACT_VERSION

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## ZkEvmV2
# `ZkEvmV2`

### MODULO_R

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IGenericErrors
# `IGenericErrors`

### ZeroAddressNotAllowed

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IMessageService
# `IMessageService`

### MessageSent

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IPauseManager
# `IPauseManager`

### PauseTypeRole

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IPermissionsManager
# `IPermissionsManager`

### RoleAddress

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IRateLimiter
# `IRateLimiter`

### RateLimitInitialized

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IL1MessageManager
# `IL1MessageManager`

### RollingHashUpdated

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IL1MessageManagerV1
# `IL1MessageManagerV1`

### MessageDoesNotExistOrHasAlreadyBeenClaimed

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IL1MessageService
# `IL1MessageService`

### ClaimMessageWithProofParams

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## ILineaRollup
# `ILineaRollup`

### InitializationData

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IPlonkVerifier
# `IPlonkVerifier`

### Verify

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IZkEvmV2
# `IZkEvmV2`

### StartingRootHashDoesNotMatch

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IL2MessageManager
# `IL2MessageManager`

### RollingHashUpdated

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IL2MessageManagerV1
# `IL2MessageManagerV1`

### MinimumFeeChanged

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## IL2MessageServiceV1
# `IL2MessageServiceV1`

### setMinimumFee

Expand Down
24 changes: 24 additions & 0 deletions contracts/docs/api/lib/CallForwardingProxy.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# `CallForwardingProxy`

### target

```solidity
address target
```

The underlying target address that is called.

### constructor

```solidity
constructor(address _target) public
```

### fallback

```solidity
fallback() external payable
```

Defaults to, and forwards all calls to the target address.

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## L2MessageServicePauseManager
# `L2MessageServicePauseManager`

### PAUSE_L1_L2_ROLE

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## LineaRollupPauseManager
# `LineaRollupPauseManager`

### PAUSE_L1_L2_ROLE

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## Mimc
# `Mimc`

### DataMissing

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## PauseManager
# `PauseManager`

### PAUSE_ALL_ROLE

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## PermissionsManager
# `PermissionsManager`

### __Permissions_init

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## SparseMerkleProof
# `SparseMerkleProof`

### Account

Expand Down Expand Up @@ -130,7 +128,7 @@ Hash a value using MIMC hash

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bytes32 | {bytes32} Mimc hash |
| [0] | bytes32 | bytes32 Mimc hash |

### getLeaf

Expand Down Expand Up @@ -190,7 +188,7 @@ Hash account value

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bytes32 | {bytes32} Account value hash |
| [0] | bytes32 | bytes32 Account value hash |

### hashStorageValue

Expand All @@ -210,5 +208,5 @@ Hash storage value

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bytes32 | {bytes32} Storage value hash |
| [0] | bytes32 | bytes32 Storage value hash |

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## TokenBridgePauseManager
# `TokenBridgePauseManager`

### PAUSE_INITIATE_TOKEN_BRIDGING_ROLE

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## Utils
# `Utils`

### _efficientKeccak

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## MessageServiceBase
# `MessageServiceBase`

### messageService

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## L1MessageManager
# `L1MessageManager`

### rollingHashes

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## L1MessageService
# `L1MessageService`

### systemMigrationBlock

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## TransientStorageReentrancyGuardUpgradeable
# `TransientStorageReentrancyGuardUpgradeable`

### ReentrantCall

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## L1MessageManagerV1
# `L1MessageManagerV1`

### INBOX_STATUS_UNKNOWN

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## L1MessageServiceV1
# `L1MessageServiceV1`

### nextMessageNumber

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## L2MessageManager
# `L2MessageManager`

### L1_L2_MESSAGE_SETTER_ROLE

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## L2MessageService
# `L2MessageService`

### CONTRACT_VERSION

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## L2MessageManagerV1
# `L2MessageManagerV1`

### INBOX_STATUS_UNKNOWN

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## L2MessageServiceV1
# `L2MessageServiceV1`

### MINIMUM_FEE_SETTER_ROLE

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Solidity API

## MessageHashing
# `MessageHashing`

### _hashMessage

Expand Down
Loading
Loading