Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
2b931bc3
Commit
2b931bc3
authored
Dec 16, 2022
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bmon: Add package scaffolding for balance-monitor
bmon: Add package scaffolding for balance-monitor
parent
7091d42c
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
561 additions
and
20 deletions
+561
-20
weak-crabs-reflect.md
.changeset/weak-crabs-reflect.md
+5
-0
.env.example
packages/balance-monitor/.env.example
+11
-0
.eslintignore
packages/balance-monitor/.eslintignore
+2
-0
.eslintrc.js
packages/balance-monitor/.eslintrc.js
+4
-0
.gitignore
packages/balance-monitor/.gitignore
+3
-0
.prettierignore
packages/balance-monitor/.prettierignore
+1
-0
.prettierrc.js
packages/balance-monitor/.prettierrc.js
+3
-0
README.md
packages/balance-monitor/README.md
+26
-0
package.json
packages/balance-monitor/package.json
+24
-0
tsconfig.json
packages/balance-monitor/tsconfig.json
+9
-0
yarn.lock
yarn.lock
+473
-20
No files found.
.changeset/weak-crabs-reflect.md
0 → 100644
View file @
2b931bc3
---
'
minimum-balance-agent'
:
patch
---
Created the Balance Monitoring package
packages/balance-monitor/.env.example
0 → 100644
View file @
2b931bc3
CHAINID=
L1_RPC_URL=
SEQUENCER_ADDRESS=
SEQUENCER_WARNING_THRESHOLD=
SEQUENCER_DANGER_THRESHOLD=
PROPOSER_ADDRESS=
PROPOSER_WARNING_THRESHOLD=
PROPOSER_DANGER_THRESHOLD=
packages/balance-monitor/.eslintignore
0 → 100644
View file @
2b931bc3
node_modules
packages/balance-monitor/.eslintrc.js
0 → 100644
View file @
2b931bc3
module
.
exports
=
{
extends
:
'
../../.eslintrc.js
'
,
ignorePatterns
:
[
'
src/contract-artifacts.ts
'
],
}
packages/balance-monitor/.gitignore
0 → 100644
View file @
2b931bc3
node_modules
dist
forta.config.json
packages/balance-monitor/.prettierignore
0 → 100644
View file @
2b931bc3
node_modules
packages/balance-monitor/.prettierrc.js
0 → 100644
View file @
2b931bc3
module
.
exports
=
{
...
require
(
'
../../.prettierrc.js
'
),
}
packages/balance-monitor/README.md
0 → 100644
View file @
2b931bc3
# 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
packages/balance-monitor/package.json
0 → 100644
View file @
2b931bc3
{
"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"
}
}
packages/balance-monitor/tsconfig.json
0 → 100644
View file @
2b931bc3
{
"extends"
:
"../../tsconfig.json"
,
"compilerOptions"
:
{
"outDir"
:
"./dist"
},
"include"
:
[
"src/**/*"
]
}
yarn.lock
View file @
2b931bc3
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment