fix: red-team.sh sudo strips FORK_URL before docker compose sees it (#729)
red-team.sh called bare `sudo docker compose up/down` which applies env_reset and drops FORK_URL before anvil-entrypoint.sh can read it. Change both calls to `sudo -E` so the caller's FORK_URL override is propagated to docker-compose and into the anvil container. Update ENVIRONMENT.md to reflect that a plain `FORK_URL=... bash red-team.sh` invocation now works correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5b4e867c4b
commit
52ed8ef233
2 changed files with 6 additions and 4 deletions
|
|
@ -42,10 +42,10 @@ FORK_URL=https://mainnet.base.org docker compose up -d
|
|||
|
||||
`red-team.sh` boots the docker-compose stack and then calls protocol operations using **Base mainnet** addresses for the Uniswap V3 periphery (V3_FACTORY, SwapRouter02, NonfungiblePositionManager). These addresses are only valid on a mainnet fork.
|
||||
|
||||
`red-team.sh` calls `sudo docker compose up -d` internally, and `sudo` strips environment variables by default. Pass `FORK_URL` inline with `-E` to preserve it:
|
||||
`red-team.sh` calls `sudo docker compose up -d` internally. The script uses `sudo -E` so that `FORK_URL` is preserved across the sudo boundary:
|
||||
|
||||
```bash
|
||||
FORK_URL=https://mainnet.base.org sudo -E bash scripts/harb-evaluator/red-team.sh
|
||||
FORK_URL=https://mainnet.base.org bash scripts/harb-evaluator/red-team.sh
|
||||
```
|
||||
|
||||
### FitnessEvaluator (`onchain/test/FitnessEvaluator.t.sol`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue