Add MEV post-deploy config patch helper

This commit is contained in:
defiQUG
2026-04-13 15:59:41 -07:00
parent f04b860763
commit 0c58ccaf6c
2 changed files with 228 additions and 0 deletions

View File

@@ -126,6 +126,28 @@ The helper also records the deployed executor's on-chain:
so you have an auditable deployment record instead of stdout-only notes.
## Cutover-ready config patching
Once the contracts are actually broadcast, use the artifact to patch the MEV config deterministically instead of editing TOML by hand:
```bash
bash scripts/deployment/apply-mev-execution-config-from-artifact.sh \
--artifact reports/status/mev_execution_deploy_YYYYMMDD_HHMMSS.json \
--config MEV_Bot/mev-platform/config.toml \
--uniswap-v2-router 0x... \
--sushiswap-router 0x...
```
That runs in dry-run mode by default and prints a unified diff. Add `--apply` when the diff is correct.
This patch step updates:
- `chains.<id>.execution.executor_contract`
- `chains.<id>.execution.flash_loan_provider`
- `chains.<id>.factories[].router` for `uniswap_v2`
- `chains.<id>.factories[].router` for `sushiswap`
- optional `relay_url` if `--relay-url` is supplied
## Commit policy
Safe to commit: