base-org / pessimism

Detect real-time threats and events on OP Stack compatible blockchains
https://base-org.github.io/pessimism/
MIT License
1.51k stars 433 forks source link

Ingest System Contract Addresses via ChainID #168

Open epociask opened 11 months ago

epociask commented 11 months ago

Problem

System config addresses for OP Stack specific heuristics (withdrawal_enforce, fault_detection) must be manually specified as input parameters to a heuristic session.

Problem Solution

Take in a CHAIN_ID env var that's processed to fetch all L1 system config addresses.

epociask commented 7 months ago

@adrain-cb this could be super useful for making pessimism better adoptable and usable since it can provide a user aliasing for predeploy contracts in their heuristic configurations (e.g, L1_OP_PORTAL => 0x0...0).

Could support some payload syntax like:

    {
        "network": "layer1",
        "type": "contract_event", 
        "start_height": null,
        "alerting_params": {
            "message": "",
            "destination": "slack"
        },
        "heuristic_params": {
            "address": "${OP_PORTAL}",
            "args": [...]
        }
    },