arbitraryexecution / forta-bot-templates Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
when attempting to build an account-balance template, i get an error about not finding the abi
folder. this specific template does not use any ABIs so there isnt an abi folder. the config is the same as this issue
forta-bot-templates (main): docker buildx build --platform linux/amd64 .
[+] Building 2.7s (9/12)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 708B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/node:12-alpine 2.5s
=> [auth] library/node:pull token for registry-1.docker.io 0.0s
=> [1/7] FROM docker.io/library/node:12-alpine@sha256:d4b15b3d48f42059a15bd659be60afe21762aae9d6cbea6f1244408 0.0s
=> [internal] load build context 0.2s
=> => transferring context: 1.15MB 0.2s
=> CACHED [2/7] WORKDIR /app 0.0s
=> CACHED [3/7] COPY ./src ./src 0.0s
=> ERROR [4/7] COPY ./abi ./abi 0.0s
------
> [4/7] COPY ./abi ./abi:
------
error: failed to solve: failed to compute cache key: "/abi" not found: not found
Hi, I'd like to use the admin events template to create a detection bot that only emits an alert for transfers/approvals associated with a specific set of addresses. Can I check for a set inclusion with the expression? Does the expression handle Ors?
Something like this:
"Transfer": {
"expression": "to == address_A || to == address_B || to == address_C",
}
Or
"Transfer": {
"expression": "to in address_A,address_B,address_C"
}
the name of the admin-events template may imply that its only meant for admin-related events, but it is actually a more generic event monitoring bot. I think it should be renamed to be clearer and consistent with the monitor-functions template i.e. monitor-events
currently the account-balance accepts an integer threshold in ETH, meaning we cannot specify a value below 1 ETH. the template should allow specifying decimal values e.g. 0.5 ETH
when I try to setup an account-balance template and then run npm run validate
, I get an error saying ERROR: bot_1:account-balance has no contracts!
. Here is the config:
{
"developerAbbreviation": "hr",
"protocolName": "hr",
"protocolAbbreviation": "hr",
"bots": [
{
"botType": "account-balance",
"name": "bot_1",
"accountBalance": {
"contractName1": {
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"thresholdEth": 1,
"alert": { "type": "Info", "severity": "Info" }
}
},
"alertMinimumIntervalSeconds": 86400
}
]
}
A major release of the forta-agent
package was just published (v0.1.1). The templates should migrate to this version as soon as possible. Code changes would only be required if the template is using the receipt
, status
or gasUsed
properties of the TransactionEvent
object (otherwise its just a version bump). see this Discord message for more details: https://discord.com/channels/869983523371642921/869986794970693723/959487384767070348
the fields for developerAbbreviation
, protocolName
and protocolAbbreviation
should be optional. as i understand it, the initial intent of these was to create distinction between alert IDs, but this has become less important over time. the primary grouping for alerts is the bot ID and this has been sufficient so far
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.