Skip to content

Commit 2474350

Browse files
committed
docs: add detailed relayer migration guide with step-by-step instructions
1 parent 6a14c4e commit 2474350

2 files changed

Lines changed: 131 additions & 17 deletions

File tree

content/defender/migration.mdx

Lines changed: 131 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ For detailed migration instructions and support, visit the [OpenZeppelin Monitor
7777

7878
### From Defender Relayer to OpenZeppelin Relayer
7979

80+
[OpenZeppelin Relayer](/relayer) is an open-source transaction relaying service that provides secure, reliable transaction submission to blockchain networks. With **Defender shutting down on July 1, 2026**, migrating to OpenZeppelin Relayer ensures continuity of your relaying infrastructure while giving you full control over your deployment.
81+
8082
OpenZeppelin Relayer offers similar functionality to Defender Relayer:
8183

8284
- **Transaction relaying**: Submit transactions to supported blockchain networks efficiently
@@ -89,34 +91,146 @@ OpenZeppelin Relayer offers similar functionality to Defender Relayer:
8991

9092
### Getting Started
9193

92-
To begin your Relayer migration:
94+
Follow these steps to migrate your Defender Relayers to OpenZeppelin Relayer:
95+
96+
#### Step 1: Download Configuration from Defender
9397

94-
1. **Review your existing relayers**: Export your Defender Relayer configurations using the "OpenZeppelin Relayer Configurations" button
98+
Export your Defender Relayer configurations using the "OpenZeppelin Relayer Configurations" button in the Defender UI.
9599

96100
![Defender Relayer Migration Button](/defender/relayer-migration-button.png)
97101

98-
The "OpenZeppelin Relayer Configurations" button will download a .zip file containing configuration files for every relayer in your Defender account (If for any reason you don't want a specific relayer to be migrated, we recommend you delete the relayer before clicking on the OpenZeppelin Relayer Configurations button ). These configurations are ready to copy and paste directly into OpenZeppelin Relayer. Before running the relayers, make sure to review and update any placeholder values in the configuration files, such as:
102+
<Callout type='info'>
103+
If you don't want a specific relayer to be migrated, delete that relayer before clicking the download button.
104+
</Callout>
99105

100-
- RPC URLs and endpoint addresses
101-
- Signer configurations and private keys
102-
- Network-specific policies
103-
- Webhook URLs for notifications
106+
**What you'll download:**
107+
108+
- **ZIP file**: Downloaded if you have relayers on forked or private networks. The ZIP contains a `config.json` file and a `networks/` folder with custom network definitions.
109+
- **JSON file**: Downloaded if all your relayers are on standard public networks. This is a single `config.json` file.
110+
111+
#### Step 2: Set Up OpenZeppelin Relayer
112+
113+
Before importing your configurations, set up the OpenZeppelin Relayer infrastructure by following the [OpenZeppelin Relayer Quick Start Guide](/relayer/quickstart).
114+
115+
#### Step 3: Place Configuration Files
116+
117+
**If you downloaded a ZIP file:**
118+
119+
1. Extract the ZIP file
120+
2. Copy `config.json` to the `config/` directory in your OpenZeppelin Relayer project
121+
3. Copy the `networks/` folder contents to `config/networks/`
122+
123+
**If you downloaded a plain JSON file:**
124+
125+
1. Copy the downloaded file to the `config/` directory
126+
2. Rename it to `config.json`
127+
128+
Your directory structure should look like:
129+
```
130+
openzeppelin-relayer/
131+
├── config/
132+
│ ├── config.json
133+
│ └── networks/ # Only if you had forked/private networks
134+
│ ├── my-network.json
135+
│ └── ...
136+
```
137+
138+
#### Step 4: Adjust Configuration
139+
140+
After placing the files, you need to update several configuration values:
141+
142+
**For custom networks (if you downloaded a ZIP file):**
143+
144+
Update the RPC URLs in each network definition file under `config/networks/`. Replace placeholder values with your actual RPC endpoint URLs:
145+
146+
```json
147+
{
148+
"network": "my-custom-network",
149+
"rpc_urls": [
150+
"https://your-rpc-endpoint.com"
151+
]
152+
}
153+
```
154+
155+
**For all migrations (both ZIP and JSON):**
156+
157+
Edit `config/config.json` to update:
158+
159+
1. **Signer configuration**: Each relayer needs a signer configured. See [Choosing a Signer Type](#choosing-a-signer-type) below for options and setup instructions.
160+
161+
2. **Notification webhooks**: Update the `notifications` section with your webhook URLs:
162+
```json
163+
"notifications": [
164+
{
165+
"id": "my-webhook",
166+
"type": "webhook",
167+
"url": "https://your-webhook-endpoint.com/notifications",
168+
"signing_key": {
169+
"type": "env",
170+
"value": "WEBHOOK_SIGNING_KEY"
171+
}
172+
}
173+
]
174+
```
175+
176+
3. **Network-specific policies**: Review and adjust policies for each relayer as needed (gas price caps, minimum balance thresholds, whitelist receivers, etc.).
177+
178+
<Callout type='info'>
179+
For detailed configuration options, see the [OpenZeppelin Relayer Configuration documentation](/relayer/configuration).
180+
</Callout>
181+
182+
#### Step 5: Verify OpenZeppelin Relayer Works
183+
184+
After configuring, start the relayer and verify it's working correctly:
185+
186+
1. **Start the relayer** using one of the methods described in the [Quick Start Guide](/relayer/quickstart) (either running locally with Cargo or using Docker Compose).
187+
188+
2. **Check the startup logs** for any configuration errors or warnings.
104189

105-
### Configuration File Structure
190+
3. **Test the API endpoints** to verify your relayers are configured correctly:
106191

107-
After downloading your relayer configurations, you'll need to organize them in your OpenZeppelin Relayer project:
192+
```bash
193+
# Get relayer details
194+
curl -X GET http://localhost:8080/api/v1/relayers/{relayer_id} \
195+
-H "Content-Type: application/json" \
196+
-H "Authorization: Bearer YOUR_API_KEY"
197+
198+
# Check relayer balance
199+
curl -X GET http://localhost:8080/api/v1/relayers/{relayer_id}/balance \
200+
-H "Content-Type: application/json" \
201+
-H "Authorization: Bearer YOUR_API_KEY"
202+
```
203+
204+
Replace `{relayer_id}` with your relayer's ID and `YOUR_API_KEY` with the API key from your `.env` file.
205+
206+
A successful response confirms your relayer is properly configured and connected to the network.
207+
208+
#### Step 6: Transfer Funds
209+
210+
Once OpenZeppelin Relayer is running correctly:
108211

109-
- **`config.json`**: Place this file in the `config/` directory
110-
- **Network files**: Place these files in the `config/networks/` directory
212+
1. Go to **Defender Relayers** in the Defender UI
213+
2. Select the relayer you want to migrate
214+
3. Go to settings
215+
4. Click the **Withdraw** button
216+
217+
![Defender Relayer Withdraw Button](/defender/withdraw.png)
218+
219+
5. **Recommended**: Transfer a small amount first and test with a transaction
220+
6. If the test transaction succeeds, transfer the remaining funds
221+
222+
<Callout type='warn'>
223+
Since you're creating new relayer addresses (see [Understanding Signer Migration](#understanding-signer-migration)), make sure to update any smart contract permissions, whitelists, or access control lists to include the new addresses before transferring all funds.
224+
</Callout>
111225

112-
This structure ensures OpenZeppelin Relayer can properly locate and load your relayer configurations.
226+
#### Step 7: Gradually Move Traffic
113227

114-
2. **Set up OpenZeppelin Relayer**: Follow the [installation guide](/relayer) to deploy the Relayer on your infrastructure
115-
3. **Import your configurations**: Use the exported configurations to recreate your relayers in OpenZeppelin Relayer
228+
After successful testing:
116229

117-
4. **Test your relayers**: Verify that transactions are processed correctly before decommissioning Defender relayers
118-
5. **Transfer funds**: Once your OpenZeppelin Relayers are fully configured and running, transfer the funds from your Defender relayers to your new OpenZeppelin Relayer addresses using the Withdraw functionality
119-
6. **Gradually move volume**: Shift traffic from Defender relayer to OpenZeppelin Relayer incrementally
230+
1. Run both Defender and OpenZeppelin Relayer in parallel
231+
2. Shift traffic incrementally from Defender to OpenZeppelin Relayer
232+
3. Monitor for any issues
233+
4. Once confident, fully switch over to OpenZeppelin Relayer
120234

121235
Here's a video with the process step by step: https://www.loom.com/share/cb5e0f5d8c064a71abc8c18fac273cf0
122236

public/defender/withdraw.png

79.1 KB
Loading

0 commit comments

Comments
 (0)