/forta-bot-sdk

Forta Detection Bot SDK and CLI tool

Primary LanguageTypeScriptMIT LicenseMIT

Forta Detection Bot SDK and CLI

npm version

Visit forta.org to learn more about Forta. See the developer documentation at docs.forta.network

Changelog

0.1.6

  • Fix sort order for chainIds array
  • Fix issue for CLI publish command when querying account balance
  • Update gRPC agent.proto to add Finding.addresses
  • Add support for addresses field to Finding
  • Add verification for account balance and ownership when running publish CLI command
  • Provide default gas estimates when interacting with registry smart contract functions
  • Include logIndex in result of TransactionEvent.filterLog
  • Include address in result of TransactionEvent.filterFunction
  • Add Finding.from alias method for Finding.fromObject
  • Set contextPath when building image
  • Update starter project README
  • Update AgentRegistry contract ABI
  • Add default chainIds to starter project package.json
  • Fix Python starter project dependencies
  • Update gRPC agent.proto to deprecate TransactionEvent.Receipt
  • Update SDK to remove receipt, status and gasUsed properties from TransactionEvent
  • Add getTransactionReceipt convenience method to SDK
  • Update CLI run command to not fetch transaction receipts
  • Update starter projects to detect for large Tether transfers
  • Update terms of use URL
  • Set default jsonRpcUrl to https://cloudflare-eth.com
  • Expose CLI functionality using configureContainer method
  • Update CLI init command to also run npm install
  • Fix Python SDK support for new chains
  • Add terms of use prompt to CLI init command
  • Update starter project Dockerfile to include line to enable logging
  • Add keyfilePassword config field for CI/CD pipelines
  • Set default ipfsGatewayUrl to https://ipfs.forta.network
  • Update getJsonRpcUrl to not throw error when running unit tests
  • Update agent image build process to always target amd64 architecture
  • Add description field to agent manifest from package.json
  • Add support for specifying multiple addresses in filterLog and filterFunction commands
  • Add --nocache option to forta-agent run command to disable writing to cache
  • Fix forta-agent run command to process blocks sequentially when listening for realtime data
  • Add support for specifying chainIds in package.json
  • Add support for private agents with the setPrivateFindings method
  • Deprecate everestId attribute of Finding
  • Deprecate filterEvent method of TransactionEvent
  • Add disk caching for the forta-agent run command
  • Add support for specifying multiple transactions/blocks for the forta-agent run command
  • Include CLI version in published manifest
  • Add getEthersBatchProvider utility function to Javascript SDK
  • Export the keccak256 utility function from Javascript and Python SDK
  • Actually fix published npm artifact
  • Fix published npm artifact
  • Fix agent publishing on Apple M1 chips
  • Add address field to result of filterLog method
  • Fix from property in agent manifest
  • Increase gas price for transactions from CLI commands
  • Add check to ensure agent documentation is not empty
  • Fix handling of network value in Python SDK
  • Change base Docker image for starter projects to node12-alpine
  • Export ethers object from Javascript SDK
  • Add getEthersProvider convenience method to SDK
  • Add filterLog and filterFunction convenience methods to TransactionEvent in SDK
  • Export web3 object from Python SDK
  • Add get_web3_provider convenience method to Python SDK
  • Add filter_log and filter_function convenience methods to TransactionEvent in Python SDK
  • Add agentId config property to support Forta Connect publishing
  • Include results of push command in publish.log
  • Improve CLI keyfile lookup
  • Fix CLI exit when running Python agents
  • Don't export getFortaConfig and get_forta_config from SDK
  • Use more raw JSON-RPC calls in CLI
  • Add new CLI command: push
  • Replace web3.js with ethers.js
  • Use raw JSON-RPC calls to fetch blocks and receipts in CLI
  • Add limit of 5 alerts to starter projects
  • Add new CLI command: keyfile
  • Add keyfile npm script to starter projects
  • Add repository field to agent manifest
  • Transition to Polygon agent registry
  • Provide default value for agentRegistryJsonRpcUrl
  • Fix agent existence check
  • Add new CLI commands: enable and disable
  • Increase gas for transactions from CLI commands
  • Remove duplicated BlockEvent properties
  • Add obfuscation step to Javascript and Typescript starter project Dockerfile
  • Improve init command to ensure that keystore folder exists
  • Fix CLI keyfile resolution
  • Make config file global by default (with option to override locally)
  • Fix starter project npm scripts to support Windows
  • Move agentId (derived from name) and version to package.json
  • Remove documentation config property and hardcode to README.md
  • Improve run command to not scan over same block
  • Add project URLs to npm and PyPi pages
  • Fix published npm artifact
  • Add npm script to ensure we build before publishing
  • Add initialize() handler to SDK
  • Add output field to TraceResult
  • Add Info option to FindingType enum
  • Add more error logging to grpc controller
  • Add more unit tests for CLI and SDK
  • Add MIT license
  • Fix handler initialization to maintain Python agent state
  • Ensure that jsonRpcUrl is http(s) only
  • Fix hex_to_int Python SDK method to accept integers
  • Add error logging to grpc controller
  • Update Typescript starter project npm scripts to build before running
  • Add unit tests to Python starter project
  • Fix hex_to_int Python SDK convenience method
  • Fix Typescript starter project Dockerfile
  • Update Python starter project requirements.txt
  • Improve Python error handling
  • Add Python SDK
  • Add Python starter project
  • Fix Python agent to run in single long-running process
  • Fix race condition when listening for blocks
  • Improve Python error handling
  • Fix receipt status not being set correctly
  • Remove handlers config property and hardcode agent filename
  • Add keyfile config property to specify a keyfile when publishing
  • Add publish.log file to log publishing result
  • Add createTransactionEvent and createBlockEvent utility methods for tests
  • Fix receipt addresses to be lowercase
  • Add unit tests for CLI commands: init, run and publish
  • Fix websocket connection preventing clean exit of CLI
  • Exclude unit tests from build
  • Fix file logging to append newline character
  • Update jest type definitions to v27.0.1
  • Add agent documentation to manifest when publishing
  • Add agent documentation to starter projects
  • Update agent registry address
  • Export more classes from SDK
  • Improve error message when unable to parse config file
  • Remove usage of web sockets when listening for blockchain data
  • Remove unnecessary call to eth_getTransaction
  • Add support for Python agents
  • Add more block data to BlockEvent
  • Add unit tests for starter project
  • Format addresses to be lowercase
  • Improve error message when config file not found
  • Hardcode Disco auth credentials
  • Add retry logic if fetching transaction or receipt fails
  • Add SDK support for tracing via traceRpcUrl config property
  • Add support for --config CLI arg to specify a config file
  • Add check for empty directory before initializing starter project
  • Add Disco authentication when publishing
  • Update filepath resolution to be OS-agnostic
  • Include forta.config.json in starter project .gitignore
  • Use new agent registry contract
  • Hardcode scanner poolId
  • Rename ipfsGatewayAuthHeader config property to ipfsGatewayAuth
  • Add publish npm script to starter project
  • Remove .npmignore file after initializing starter project
  • Add getJsonRpcUrl and getFortaConfig SDK convenience methods
  • Add more alias methods for TransactionEvent properties in SDK
  • Add npm scripts to starter project package.json
  • Export FortaConfig type from SDK
  • Fix starter project .gitignore renaming issue when publishing npm package
  • Update init to use existing keyfile if one exists (instead of always creating new one)
  • Update starter project package.json to use forta-agent npm package
  • Initialize repository
  • Initialize CLI commands: init, run and publish
  • Initialize Javascript and Typescript SDK
  • Initialize Javascript and Typescript high gas starter project