Skip to content
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
88 changes: 44 additions & 44 deletions .github/workflows/oracle.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: Oracle
# name: Oracle

on:
push:
branches:
- main
paths:
- "oracle/**"
- ".github/workflows/oracle.yaml"
pull_request:
paths:
- "build/**"
- "bindings/**"
- "node/**"
- "oracle/**"
- ".github/workflows/oracle.yaml"
# on:
# push:
# branches:
# - main
# paths:
# - "oracle/**"
# - ".github/workflows/oracle.yaml"
# pull_request:
# paths:
# - "build/**"
# - "bindings/**"
# - "node/**"
# - "oracle/**"
# - ".github/workflows/oracle.yaml"

defaults:
run:
working-directory: "oracle"
# defaults:
# run:
# working-directory: "oracle"

jobs:
check:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x
- name: Lint
run: |
rm -rf $HOME/.cache/golangci-lint
make lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x
- name: Run build
run: make build
- name: Run tests
run: make test
# jobs:
# check:
# if: github.event.pull_request.draft == false
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Install Go
# uses: actions/setup-go@v5
# with:
# go-version: 1.24.x
# - name: Lint
# run: |
# rm -rf $HOME/.cache/golangci-lint
# make lint
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Install Go
# uses: actions/setup-go@v5
# with:
# go-version: 1.24.x
# - name: Run build
# run: make build
# - name: Run tests
# run: make test
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################## update dependencies ####################
ETHEREUM_SUBMODULE_COMMIT_OR_TAG := morph-v2.0.9
ETHEREUM_TARGET_VERSION := morph-v2.0.8
ETHEREUM_SUBMODULE_COMMIT_OR_TAG := morph-v2.1.0
ETHEREUM_TARGET_VERSION := v1.10.14-0.20251219060125-03910bc750a2
TENDERMINT_TARGET_VERSION := v0.3.2

ETHEREUM_MODULE_NAME := github.com/morph-l2/go-ethereum
Expand Down Expand Up @@ -30,6 +30,7 @@ update_all_mod:
@$(MAKE) update_mod MODULE=ops/tools
@$(MAKE) update_mod MODULE=oracle
@$(MAKE) update_mod MODULE=tx-submitter
@$(MAKE) update_mod MODULE=token-price-oracle


update:
Expand Down
4 changes: 1 addition & 3 deletions MakefileEc2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build-bk-prod-morph-prod-mainnet-to-morph-tx-submitter:
tar -czvf tx-submitter.tar.gz dist
aws s3 cp tx-submitter.tar.gz s3://morph-0582-morph-technical-department-mainnet-data/morph-setup/tx-submitter.tar.gz


# build for qanet
build-bk-test-morph-test-qanet-to-morph-node-qanet:
if [ ! -d dist ]; then mkdir -p dist; fi
cd $(PWD)/node && make build
Expand All @@ -38,7 +38,6 @@ build-bk-test-morph-test-qanet-to-morph-tx-submitter-qanet:
tar -czvf tx-submitter.tar.gz dist
aws s3 cp tx-submitter.tar.gz s3://morph-7637-morph-technical-department-qanet-data/morph-setup/tx-submitter.tar.gz


# build for hoodi
build-bk-prod-morph-prod-testnet-to-morph-node-hoodi:
if [ ! -d dist ]; then mkdir -p dist; fi
Expand All @@ -54,4 +53,3 @@ build-bk-prod-morph-prod-testnet-to-morph-tx-submitter-hoodi:
cp tx-submitter/tx-submitter dist/
tar -czvf tx-submitter.tar.gz dist
aws s3 cp tx-submitter.tar.gz s3://morph-0582-morph-technical-department-testnet-data/testnet/hoodi/morph-setup/tx-submitter.tar.gz

30 changes: 30 additions & 0 deletions MakefileEks.mk
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,36 @@ build-bk-test-morph-test-qanet-to-morph-staking-oracle-qanet:
start-bk-test-morph-test-qanet-to-morph-staking-oracle-qanet:
/data/secret-manager-wrapper ./staking-oracle

# qanet
build-bk-test-morph-test-qanet-to-morph-token-price-oracle:
if [ ! -d dist ]; then mkdir -p dist; fi
env GO111MODULE=on CGO_LDFLAGS="-ldl" CGO_ENABLED=1 go build -v $(LDFLAGS) -o token-price-oracle/token-price-oracle ./token-price-oracle/cmd
cp token-price-oracle/token-price-oracle dist/
aws s3 cp s3://morph-7637-morph-technical-department-qanet-data/morph-setup/secret-manager-wrapper.tar.gz ./
tar -xvzf secret-manager-wrapper.tar.gz

start-bk-test-morph-test-qanet-to-morph-token-price-oracle:
/data/secret-manager-wrapper ./token-price-oracle

build-bk-prod-morph-prod-testnet-to-morph-token-price-oracle-hoodi:
if [ ! -d dist ]; then mkdir -p dist; fi
env GO111MODULE=on CGO_LDFLAGS="-ldl" CGO_ENABLED=1 go build -v $(LDFLAGS) -o token-price-oracle/token-price-oracle ./token-price-oracle/cmd
cp token-price-oracle/token-price-oracle dist/


start-bk-prod-morph-prod-testnet-to-morph-token-price-oracle-hoodi:
/data/secret-manager-wrapper ./token-price-oracle


build-bk-prod-morph-prod-mainnet-to-morph-token-price-oracle:
if [ ! -d dist ]; then mkdir -p dist; fi
env GO111MODULE=on CGO_LDFLAGS="-ldl" CGO_ENABLED=1 go build -v $(LDFLAGS) -o token-price-oracle/token-price-oracle ./token-price-oracle/cmd
cp token-price-oracle/token-price-oracle dist/


start-bk-prod-morph-prod-mainnet-to-morph-token-price-oracle:
/data/secret-manager-wrapper ./token-price-oracle


# gas-oracle
# testnet
Expand Down
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,73 @@ Morph is an innovative force reshaping the consumer blockchain landscape for pra

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

## Development

### Setting Up Local Development Network

This repository supports launching a local private Morph network for development and debugging purposes.

#### Start the Development Network

```bash
make devnet-up
```

This command performs the following steps:
1. Initializes and updates the go-ethereum submodule to the specified version
2. Builds the go-ubuntu-builder Docker image (if not already present)
3. Compiles all necessary components (L1 execution layer, consensus layer, L2 node, and services)
4. Generates genesis configurations for both L1 and L2 networks
5. Deploys smart contracts to the L1 network
6. Starts a 4-node Morph network with associated services

**Note:** The initial startup may take considerable time due to extensive building operations.

#### Clean Up the Network

To completely remove the development network including Docker images:

```bash
make devnet-clean
```

To clean up only the data and build artifacts while preserving Docker images:

```bash
make devnet-clean-build
```

### Managing Dependencies

#### Update Module Dependencies

To download or update dependencies for all modules in this monorepo:

```bash
make update
```

This command synchronizes the Go workspace and updates all module dependencies according to the versions specified in the Makefile:
- `ETHEREUM_TARGET_VERSION`: Specifies the go-ethereum dependency version
- `TENDERMINT_TARGET_VERSION`: Specifies the tendermint dependency version

#### Update Submodules

To update the go-ethereum submodule to the target version:

```bash
make submodules
```

This command updates the go-ethereum submodule to the commit/tag specified by `ETHEREUM_SUBMODULE_COMMIT_OR_TAG` in the Makefile.

### Additional Commands

- `make lint`: Run linters for both Solidity and Go code
- `make fmt`: Format Solidity and Go code
- `make bindings`: Generate Go bindings from smart contracts
- `make geth`: Build the geth binary from the go-ethereum submodule

## Learn more

Website: https://www.morphl2.io/
Expand Down
7 changes: 5 additions & 2 deletions bindings/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ bindings: \
morph-standard-erc20-factory-bindings \
morph-wrapped-ether-bindings \
erc20-bindings \
l2-wst-eth-bindings
l2-wst-eth-bindings \
l2-token-registry-bindings
version:
forge --version
abigen --version
Expand Down Expand Up @@ -118,6 +119,8 @@ l2-to-l1-message-passer-bindings: compile
./gen_bindings.sh contracts/l2/system/L2ToL1MessagePasser.sol:L2ToL1MessagePasser $(pkg)
l2-tx-fee-vault-bindings: compile
./gen_bindings.sh contracts/l2/system/L2TxFeeVault.sol:L2TxFeeVault $(pkg)
l2-token-registry-bindings: compile
./gen_bindings.sh contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry $(pkg)

# Staking
l2-gov-bindings: compile
Expand Down Expand Up @@ -191,7 +194,7 @@ more: compile-forge
go run ./gen/main.go \
-artifacts ../contracts/artifacts \
-out ./bindings \
-contracts ProxyAdmin,TransparentUpgradeableProxy,L1MessageQueueWithGasPriceOracle,L1USDCGateway,L1Staking,L1CrossDomainMessenger,L1StandardERC20Gateway,L1ETHGateway,L1ERC20Gateway,L1GatewayRouter,L1WETHGateway,L1LidoGateway,Rollup,MultipleVersionRollupVerifier,L2CrossDomainMessenger,GasPriceOracle,L2ToL1MessagePasser,L2TxFeeVault,Sequencer,Gov,Distribute,L2Staking,Record,L2ETHGateway,L2StandardERC20Gateway,L2GatewayRouter,L2WETHGateway,L2ERC20Gateway,L2ERC721Gateway,L2ERC1155Gateway,L2LidoGateway,MorphToken,MorphStandardERC20,MorphStandardERC20Factory,WrappedEther,L2USDCGateway,EnforcedTxGateway,L1ERC721Gateway,L1ERC1155Gateway,L1ReverseCustomGateway,L2WithdrawLockERC20Gateway,L2ReverseCustomGateway,Whitelist,ZkEvmVerifierV1,L2WstETHToken \
-contracts ProxyAdmin,TransparentUpgradeableProxy,L2TokenRegistry,L1MessageQueueWithGasPriceOracle,L1USDCGateway,L1Staking,L1CrossDomainMessenger,L1StandardERC20Gateway,L1ETHGateway,L1ERC20Gateway,L1GatewayRouter,L1WETHGateway,L1LidoGateway,Rollup,MultipleVersionRollupVerifier,L2CrossDomainMessenger,GasPriceOracle,L2ToL1MessagePasser,L2TxFeeVault,Sequencer,Gov,Distribute,L2Staking,Record,L2ETHGateway,L2StandardERC20Gateway,L2GatewayRouter,L2WETHGateway,L2ERC20Gateway,L2ERC721Gateway,L2ERC1155Gateway,L2LidoGateway,MorphToken,MorphStandardERC20,MorphStandardERC20Factory,WrappedEther,L2USDCGateway,EnforcedTxGateway,L1ERC721Gateway,L1ERC1155Gateway,L1ReverseCustomGateway,L2WithdrawLockERC20Gateway,L2ReverseCustomGateway,Whitelist,ZkEvmVerifierV1,L2WstETHToken \
-package bindings

mkdir:
Expand Down
1 change: 1 addition & 0 deletions bindings/bin/l2tokenregistry_deployed.hex

Large diffs are not rendered by default.

Loading
Loading