fix: initialize POOL_ADDRESS before conditional block (review feedback)
Prevents unbound variable crash under set -u when factory lookup fails.
This commit is contained in:
parent
e20b4517fd
commit
caabcde20c
1 changed files with 1 additions and 0 deletions
|
|
@ -104,6 +104,7 @@ extract_addresses() {
|
|||
fi
|
||||
|
||||
# Discover Uniswap pool address from factory
|
||||
POOL_ADDRESS=""
|
||||
detect_swap_router
|
||||
local factory
|
||||
factory=$(cast call --rpc-url "$ANVIL_RPC" "$SWAP_ROUTER" "factory()(address)" 2>/dev/null) || factory=""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue