Skip to content

Commit 21a7989

Browse files
committed
Merge remote-tracking branch 'origin/ev-deployer-part4-ev-dev-integration' into feat/ev-dev-part5-tui
2 parents 739b3e0 + 2af627e commit 21a7989

30 files changed

Lines changed: 182 additions & 1960 deletions

.claude/skills/contracts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: This skill should be used when the user asks about "ev-reth contracts", "FeeVault", "AdminProxy", "fee bridging to Celestia", "Hyperlane integration", "Foundry deployment scripts", "genesis allocations", or wants to understand how base fees are redirected and bridged.
2+
description: This skill should be used when the user asks about "ev-reth contracts", "FeeVault", "AdminProxy", "fee distribution", "Foundry deployment scripts", "genesis allocations", or wants to understand how base fees are redirected and distributed.
33
---
44

55
# Contracts Onboarding
@@ -9,13 +9,13 @@ description: This skill should be used when the user asks about "ev-reth contrac
99
The contracts live in `contracts/` and use Foundry for development. There are two main contracts:
1010

1111
1. **AdminProxy** (`src/AdminProxy.sol`) - Bootstrap contract for admin addresses at genesis
12-
2. **FeeVault** (`src/FeeVault.sol`) - Collects base fees, bridges to Celestia via Hyperlane (cross-chain messaging protocol)
12+
2. **FeeVault** (`src/FeeVault.sol`) - Collects base fees and distributes them between configured recipients
1313

1414
## Key Files
1515

1616
### Contract Sources
1717
- `contracts/src/AdminProxy.sol` - Transparent proxy pattern for admin control
18-
- `contracts/src/FeeVault.sol` - Fee collection and bridging logic
18+
- `contracts/src/FeeVault.sol` - Fee collection and distribution logic
1919

2020
### Deployment Scripts
2121
- `contracts/script/DeployFeeVault.s.sol` - FeeVault deployment with CREATE2
@@ -34,7 +34,7 @@ The AdminProxy contract provides a bootstrap mechanism for setting admin address
3434
### FeeVault
3535
The FeeVault serves as the destination for redirected base fees (instead of burning them). Key responsibilities:
3636
- Receive base fees from block production
37-
- Bridge accumulated fees to Celestia via Hyperlane
37+
- Distribute accumulated fees between configured recipients
3838
- Manage withdrawal permissions
3939

4040
## Connection to Rust Code

.github/workflows/ev_deployer.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ jobs:
4040
- name: Install Foundry
4141
uses: foundry-rs/foundry-toolchain@v1
4242

43-
- name: Install Hyperlane soldeer dependencies
44-
run: cd contracts/lib/hyperlane-monorepo/solidity && forge soldeer install
45-
4643
- name: Run bytecode verification tests
4744
run: cargo test -p ev-deployer -- --ignored --test-threads=1
4845

.github/workflows/unit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
cargo nextest run \
3636
--locked \
3737
--workspace \
38-
-E "(kind(lib) | kind(bin) | kind(proc-macro))" \
38+
-E "(kind(lib) | kind(bin) | kind(proc-macro)) - package(ev-tests)" \
3939
--no-tests=warn
4040
4141
client-test:

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[submodule "contracts/lib/forge-std"]
22
path = contracts/lib/forge-std
33
url = https://github.com/foundry-rs/forge-std
4-
[submodule "contracts/lib/hyperlane-monorepo"]
5-
path = contracts/lib/hyperlane-monorepo
6-
url = https://github.com/hyperlane-xyz/hyperlane-monorepo.git
74
[submodule "contracts/lib/permit2"]
85
path = contracts/lib/permit2
96
url = https://github.com/Uniswap/permit2

Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/ev-deployer/README.md

Lines changed: 5 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ The binary is output to `target/release/ev-deployer`.
1414

1515
EV Deployer uses a TOML config file to define what contracts to include and how to configure them. See [`examples/devnet.toml`](examples/devnet.toml) for a complete example.
1616

17-
See [`examples/devnet.toml`](examples/devnet.toml) for a complete example with all contracts configured.
18-
1917
### Config reference
2018

2119
#### `[chain]`
@@ -31,60 +29,12 @@ See [`examples/devnet.toml`](examples/devnet.toml) for a complete example with a
3129
| `address` | address | Address to deploy at |
3230
| `owner` | address | Owner (must not be zero) |
3331

34-
#### `[contracts.fee_vault]`
35-
36-
| Field | Type | Description |
37-
|----------------------|---------|--------------------------------------------------|
38-
| `address` | address | Address to deploy at |
39-
| `owner` | address | Owner address |
40-
| `destination_domain` | u32 | Hyperlane destination domain (default: 0) |
41-
| `recipient_address` | bytes32 | Hyperlane recipient address (default: zero) |
42-
| `minimum_amount` | u64 | Minimum amount for bridging (default: 0) |
43-
| `call_fee` | u64 | Call fee for sendToCelestia (default: 0) |
44-
| `bridge_share_bps` | u64 | Basis points for bridge share, 0–10000 (default: 0, treated as 10000) |
45-
| `other_recipient` | address | Other recipient for split accounting (default: zero) |
46-
| `hyp_native_minter` | address | HypNativeMinter address (default: zero) |
47-
48-
#### `[contracts.mailbox]`
49-
50-
| Field | Type | Description |
51-
|-----------------|---------|-----------------------------------------------------|
52-
| `address` | address | Address to deploy at |
53-
| `owner` | address | Owner address (default: zero) |
54-
| `default_ism` | address | Default interchain security module (default: zero) |
55-
| `default_hook` | address | Default post-dispatch hook (default: zero) |
56-
| `required_hook` | address | Required post-dispatch hook, e.g. MerkleTreeHook (default: zero) |
57-
58-
#### `[contracts.merkle_tree_hook]`
59-
60-
| Field | Type | Description |
61-
|-----------|---------|----------------------------------------------------|
62-
| `address` | address | Address to deploy at |
63-
| `owner` | address | Owner address (default: zero) |
64-
| `mailbox` | address | Mailbox address (patched into bytecode as immutable)|
65-
66-
#### `[contracts.noop_ism]`
67-
68-
| Field | Type | Description |
69-
|-----------|---------|----------------------|
70-
| `address` | address | Address to deploy at |
71-
7232
#### `[contracts.permit2]`
7333

7434
| Field | Type | Description |
7535
|-----------|---------|----------------------------------------------------------|
7636
| `address` | address | Address to deploy at (canonical: `0x000000000022D473...`) |
7737

78-
#### `[contracts.protocol_fee]`
79-
80-
| Field | Type | Description |
81-
|--------------------|---------|---------------------------------------------------|
82-
| `address` | address | Address to deploy at |
83-
| `owner` | address | Owner address (default: zero) |
84-
| `max_protocol_fee` | u64 | Maximum protocol fee in wei |
85-
| `protocol_fee` | u64 | Protocol fee charged per dispatch in wei (default: 0) |
86-
| `beneficiary` | address | Beneficiary address that receives collected fees (default: zero) |
87-
8838
## Usage
8939

9040
### Generate a starter config
@@ -136,12 +86,7 @@ Output:
13686
```json
13787
{
13888
"admin_proxy": "0x000000000000000000000000000000000000Ad00",
139-
"fee_vault": "0x000000000000000000000000000000000000FE00",
140-
"mailbox": "0x0000000000000000000000000000000000001200",
141-
"merkle_tree_hook": "0x0000000000000000000000000000000000001100",
142-
"noop_ism": "0x0000000000000000000000000000000000001300",
143-
"permit2": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
144-
"protocol_fee": "0x0000000000000000000000000000000000001400"
89+
"permit2": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
14590
}
14691
```
14792

@@ -153,15 +98,10 @@ ev-deployer compute-address --config deploy.toml --contract admin_proxy
15398

15499
## Contracts
155100

156-
| Contract | Description |
157-
|--------------------|---------------------------------------------------------|
158-
| `admin_proxy` | Proxy contract with owner-based access control |
159-
| `fee_vault` | Fee vault with Hyperlane bridging support |
160-
| `mailbox` | Hyperlane core messaging hub |
161-
| `merkle_tree_hook` | Hyperlane required hook (Merkle tree for messages) |
162-
| `noop_ism` | Hyperlane ISM that accepts all messages |
163-
| `permit2` | Uniswap canonical token approval manager |
164-
| `protocol_fee` | Hyperlane post-dispatch hook that charges a protocol fee|
101+
| Contract | Description |
102+
|---------------|----------------------------------------------------|
103+
| `admin_proxy` | Proxy contract with owner-based access control |
104+
| `permit2` | Uniswap canonical token approval manager |
165105

166106
Runtime bytecodes are embedded in the binary — no external toolchain is needed at deploy time.
167107

bin/ev-deployer/examples/devnet.toml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,7 @@ chain_id = 1234
55
address = "0x000000000000000000000000000000000000Ad00"
66
owner = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
77

8-
[contracts.fee_vault]
9-
address = "0x000000000000000000000000000000000000FE00"
10-
owner = "0x000000000000000000000000000000000000Ad00"
11-
destination_domain = 0
12-
recipient_address = "0x0000000000000000000000000000000000000000000000000000000000000000"
13-
minimum_amount = 0
14-
call_fee = 0
15-
bridge_share_bps = 10000
16-
other_recipient = "0x0000000000000000000000000000000000000000"
17-
hyp_native_minter = "0x0000000000000000000000000000000000000000"
18-
19-
[contracts.mailbox]
20-
address = "0x0000000000000000000000000000000000001200"
21-
owner = "0x000000000000000000000000000000000000Ad00"
22-
default_ism = "0x0000000000000000000000000000000000001300"
23-
default_hook = "0x0000000000000000000000000000000000001400"
24-
required_hook = "0x0000000000000000000000000000000000001100"
25-
26-
[contracts.merkle_tree_hook]
27-
address = "0x0000000000000000000000000000000000001100"
28-
owner = "0x000000000000000000000000000000000000Ad00"
29-
mailbox = "0x0000000000000000000000000000000000001200"
30-
31-
[contracts.noop_ism]
32-
address = "0x0000000000000000000000000000000000001300"
33-
348
[contracts.permit2]
359
# Canonical Uniswap Permit2 address (same on all chains via CREATE2).
3610
# Using it here so frontends, SDKs and routers work out of the box.
3711
address = "0x000000000022D473030F116dDEE9F6B43aC78BA3"
38-
39-
[contracts.protocol_fee]
40-
address = "0x0000000000000000000000000000000000001400"
41-
owner = "0x000000000000000000000000000000000000Ad00"
42-
max_protocol_fee = 1000000000000000000
43-
protocol_fee = 0
44-
beneficiary = "0x000000000000000000000000000000000000Ad00"

0 commit comments

Comments
 (0)