Code Monkey home page Code Monkey logo

forta-bot-templates's People

Contributors

ae-cloin avatar arbitrary-codebeholder avatar arbitrary-echo avatar arbitrary-nomad avatar arbitrary-sparrow avatar darian-ae avatar rossae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

forta-bot-templates's Issues

building bot image throws error about abi folder not found

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

[Admin events] Checking for set inclusion in expressions

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"
}

rename admin-events to monitor-events

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

account-balance template throws error about no contracts

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
    }
  ]
}

make developer and protocol name/abbreviation optional

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.