You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What if we natively support smart contract utility functions in the Forta SDK? This'll enhance the bot developer experience and simplify bot logic.
For example, @xaler5's DeconstructBot detects new smart contract creations, analyzes bytecode, and output alerts with contract code metadata. These are producing 1MB alerts for every new smart contract creation.
metadata: {
transaction: // transaction.hash,
contractAddress: // Contract address provided by the transaction receipt.
functions: // list of functions signatures that matched with 4byte directory. Their text string is provided.
unknownFunctions: //list of functions signatures that didn't match with 4byte directory.
events: // list of event signatures that matched with 4byte directory. Their text string is provided.
unknownEvents: // list of event signatures that didn't match with 4byte directory.
bytecode: // The deployed bytecode (without init code).
disassembled: // List of opcodes and their eventual values.
analysis: // Output of Yasold tool.}
Proposed solution
What if any JS/Python bot could call the following functions for any contract address in their bot logic?
disassembleBytecode returns opcodes and deployed bytecode
getFunctions returns known and unknown functions signatures
getEvents returns known and unknown event signatures
@kovart@christian-forta Love to hear your thoughts! @xaler5 since you created these useful functions, would you be interested in integrating them into the Forta SDK?
The text was updated successfully, but these errors were encountered:
Problem
At least 3 detection bots disassemble smart contracts into opcodes:
What if we natively support smart contract utility functions in the Forta SDK? This'll enhance the bot developer experience and simplify bot logic.
For example, @xaler5's DeconstructBot detects new smart contract creations, analyzes bytecode, and output alerts with contract code metadata. These are producing 1MB alerts for every new smart contract creation.
Proposed solution
What if any JS/Python bot could call the following functions for any contract address in their bot logic?
disassembleBytecode
returns opcodes and deployed bytecodegetFunctions
returns known and unknown functions signaturesgetEvents
returns known and unknown event signaturesThese functions already exist in https://github.com/OpenZeppelin/contract-bots-gang/blob/master/contract-deconstruct/src/agent.ts
@kovart @christian-forta Love to hear your thoughts!
@xaler5 since you created these useful functions, would you be interested in integrating them into the Forta SDK?
The text was updated successfully, but these errors were encountered: