Skip to content

[tooling] Anvil BSC mainnet fork script for local end-to-end demo #49

@obchain

Description

@obchain

Goal

Local anvil fork of BSC mainnet so the full liquidation path (scanner → profit → Aave V3 flashloan → Venus liquidate → PancakeSwap swap) can be demonstrated without real funds.

Scope

  • New script: scripts/anvil_fork.sh
    • Primary RPC: https://bsc.drpc.org (free, archive, keyless)
    • Fallback: https://bsc-rpc.publicnode.com
    • Preserve chainId 56 via --chain-id 56
    • Pin fork block via FORK_BLOCK env var (default: latest)
    • Expose :8545 HTTP + WS
  • New file: config/fork.toml mirroring mainnet config with RPC http://127.0.0.1:8545
  • README section: fork demo steps

Acceptance

  • ./scripts/anvil_fork.sh boots anvil and prints fork block
  • charon --config config/fork.toml test-connection prints the forked head
  • Fork survives >100 blocks of charon scanning without crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    layer:devopsCI / deploy / infra / telemetrypriority:p2-polishNice-to-have / polishstatus:readyScoped and ready to pick uptype:featureNew capability or deliverable

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions