Skip to content

Instantly share code, notes, and snippets.

@kelvinpraises
Last active December 9, 2025 18:15
Show Gist options
  • Select an option

  • Save kelvinpraises/83c792ba52bc255d3ca7af1729aa14cd to your computer and use it in GitHub Desktop.

Select an option

Save kelvinpraises/83c792ba52bc255d3ca7af1729aa14cd to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
RPC_URL="https://ethereum-sepolia-rpc.publicnode.com"
EOA_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
EOA_ADDR="0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
PAYER_KEY="0x2df416eabadfad63d49c3555472336318b90309192de1701b568117e5ef3218a"
TARGET_ADDR="0x0000000000000000000000000000000000000000"
echo "Initial State:"
cast code $EOA_ADDR --rpc-url $RPC_URL
NONCE=$(cast nonce $EOA_ADDR --rpc-url $RPC_URL)
echo "Current Nonce: $NONCE"
echo "Signing delegation to ZERO address..."
AUTH=$(cast wallet sign-auth --private-key $EOA_KEY --chain 11155111 --nonce $NONCE $TARGET_ADDR)
echo "Sending HIGH PRIORITY transaction..."
# Using 50 gwei priority fee (standard was ~1 gwei)
TXHASH=$(cast send $EOA_ADDR --rpc-url $RPC_URL --private-key $PAYER_KEY --auth "$AUTH" --value 0 --gas-limit 200000 --priority-gas-price 50gwei --gas-price 100gwei --json | grep "transactionHash" | cut -d '"' -f 4)
echo "Tx Hash: $TXHASH"
echo "Waiting for receipt..."
sleep 15
echo "Final State:"
CODE=$(cast code $EOA_ADDR --rpc-url $RPC_URL)
echo "$CODE"
if [[ "$CODE" == "0x" ]] || [[ "$CODE" == "0x00" ]]; then
echo "SUCCESS: Delegated to zero address (Code is empty)."
elif [[ "$CODE" == *"4c7218"* ]]; then
echo "FAILURE: Still delegated to malicious contract."
else
echo "UNKNOWN: Code is $CODE"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment