Commit 874457d0 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4516 from ethereum-optimism/jm/monitoring/package

bmon: Add package scaffolding for balance-monitor
parents bd907f6c 3bc8c737
---
'minimum-balance-agent': patch
---
Created the Balance Monitoring package
CHAINID=
L1_RPC_URL=
SEQUENCER_ADDRESS=
SEQUENCER_WARNING_THRESHOLD=
SEQUENCER_DANGER_THRESHOLD=
PROPOSER_ADDRESS=
PROPOSER_WARNING_THRESHOLD=
PROPOSER_DANGER_THRESHOLD=
module.exports = {
extends: '../../.eslintrc.js',
ignorePatterns: ['src/contract-artifacts.ts'],
}
node_modules
dist
forta.config.json
module.exports = {
...require('../../.prettierrc.js'),
}
# Minimum Balance Agent
## Description
A forta agent which detects when a specified account balance is below 0.5 ETH
## Running
1. Copy `.env.example` into `.env` and set the values as desired.
2. `yarn run start:prod`
## Alerts
- `OPTIMISM-BALANCE-WARNING-[ACCOUNT_NAME]`
- `ACCOUNT_NAME` is either `SEQUENCER` or `PROPOSER`
- Fired when the specified account balance is below the configured WARNING threshold
- Severity is always set to "info"
- Type is always set to "info"
- Metadata "balance" field contains amount of wei in account
- `OPTIMISM-BALANCE-DANGER-[ACCOUNT_NAME]`
- Fired when the specified account balance is below the configured DANGER threshold
- Severity is always set to "high"
- Type is always set to "info"
- Metadata "balance" field contains amount of wei in account
{
"name": "minimum-balance-agent",
"version": "0.0.1",
"description": "Forta Agent that reports whether certain accounts have fallen below some balance",
"scripts": {
"build": "echo 'todo'",
"start": "yarn run start:dev",
"start:dev": "nodemon --watch src --watch forta.config.json -e js,ts,json --exec 'yarn run build && forta-agent run'",
"start:prod": "forta-agent run --prod",
"tx": "yarn run build && forta-agent run --tx",
"block": "yarn run build && forta-agent run --block",
"range": "yarn run build && forta-agent run --range",
"test": "echo 'todo'"
},
"dependencies": {
"ethers": "^5.7.2",
"forta-agent": "^0.1.1"
},
"devDependencies": {
"@types/nodemon": "^1.19.0",
"nodemon": "^2.0.8",
"typescript": "^4.3.4"
}
}
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist"
},
"include": [
"src/**/*"
]
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment