Skip to content

Commit

Permalink
add linea example (#34)
Browse files Browse the repository at this point in the history
* deploy and init

* add linea example

* lint fix

* adaptation of Linea
  • Loading branch information
zkJoaquin authored Feb 17, 2024
1 parent 39cd64e commit 414b36c
Show file tree
Hide file tree
Showing 11 changed files with 9,502 additions and 12 deletions.
4 changes: 2 additions & 2 deletions contracts/dev-contracts/DummyZkLink.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ contract DummyZkLink is IZkLink, OwnableUpgradeable, UUPSUpgradeable, Reentrancy
}

function syncL2Requests(uint256 _newTotalSyncedPriorityTxs) external payable {
bytes memory callData = abi.encode(msg.value, _newTotalSyncedPriorityTxs);
gateway.sendMessage{value: msg.value}(msg.value, callData);
bytes memory callData = abi.encode(0, _newTotalSyncedPriorityTxs);
gateway.sendMessage{value: msg.value}(0, callData);
}

function syncBatchRoot(
Expand Down
21 changes: 21 additions & 0 deletions examples/linea/.env-sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This is a sample .env file for use in local development.

# Duplicate this file as .env here

# Your Private key

DEVNET_PRIVKEY="0x your key here"

# Hosted Aggregator Node (JSON-RPC Endpoint). This is Linea Goerli Testnet, can use any Linea chain

L2RPC="https://rpc.goerli.linea.build"

# Ethereum RPC; i.e., for Goerli https://goerli.infura.io/v3/<your infura key>

L1RPC=""

# Linea chain name
LINEA="LINEATEST"

# Ethereum chain name
ETHEREUM="GOERLI"
1 change: 1 addition & 0 deletions examples/linea/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
14 changes: 14 additions & 0 deletions examples/linea/hardhat.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
require('@nomicfoundation/hardhat-toolbox');
require('./scripts/syncL2Requests');
require('./scripts/syncBatchRoot');
require('./scripts/setValidator');
require('./scripts/changeFeeParams');

const BaseConfig = require('../../hardhat.base.config');

module.exports = Object.assign({}, BaseConfig, {
paths: {
cache: '../../cache',
artifacts: '../../artifacts',
},
});
Loading

0 comments on commit 414b36c

Please sign in to comment.