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

Enhance README with Installation and Usage Sections #636

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Morph is an innovative force reshaping the consumer blockchain landscape for pra

1. [What is & Why Responsive Validity Proof?](https://docs.morphl2.io/docs/how-morph-works/optimistic-zkevm/#what-is-rvp)


2. [How Does RVP Run in Morph?](https://medium.com/@morphlayer2/how-does-rvp-run-in-morph-6025233a21cc)

## Learn more
Expand Down
43 changes: 43 additions & 0 deletions bindings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,46 @@ make devtools
```

The geth docs for `abigen` can be found [here](https://geth.ethereum.org/docs/dapp/native-bindings).

## Installation and Setup

1. **Clone the repository**:
```bash
git clone https://github.com/yourusername/morph-bindings.git
cd morph-bindings
Comment on lines +36 to +37
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
git clone https://github.com/yourusername/morph-bindings.git
cd morph-bindings
git clone https://github.com/morph-l2/morph
cd morph/bindings

```
2. **Install Dependencies**
Ensure you have all required dependencies installed, including:
- `jq`
- `abigen`
- `solc`
- `make`
- `hardhat`

Install these as needed, following the official documentation for each tool.

3. **Compile Contracts**
Use `make` to compile the contracts and generate bindings. Run:
```bash
make all
```
## Structure and Contents

### Key Files

- **types.go**: Defines the main data structures for compiler input, settings, output, and storage layout, allowing smooth integration between the Go application and Ethereum contracts.
- **Makefile**: Automates tasks including compilation, generating bindings, and cleaning up build files.
- **compile.sh**: Script to compile contracts using `hardhat` or `forge`.
- **gen_bindings.sh**: Script to generate contract bindings using `abigen` and customize dependencies.

### Contract Bindings

The bindings provide access to the following types of contracts:
- **L1 Contracts**: Staking, gateways, and cross-domain messaging between L1 and L2.
- **L2 Contracts**: Fee management, staking, and distribution, along with specific gateways for assets like ERC-20, ERC-721, and ERC-1155 tokens.

### Modules

- **Storage Layouts**: Stores layout details for each contract, used for setting up state storage dynamically during testing.
- **Bytecode Management**: Includes both deployed and undeployed bytecode for each contract, allowing for flexible deployment.

Loading