foundry_common

Module abi

Source
Expand description

ABI related helper functions.

Functionsยง

  • Decodes the calldata of the function
  • Helper function to coerce a value to a [DynSolValue] given a type string
  • Given a function and a vector of string arguments, it proceeds to convert the args to alloy [DynSolValue]s and then ABI encode them.
  • Given a function and a vector of string arguments, it proceeds to convert the args to alloy [DynSolValue]s and encode them using the packed encoding.
  • If the code at address is a proxy, recurse until we find the implementation.
  • Given an error signature string, it tries to parse it as a Error
  • Given an event signature string, it tries to parse it as a Event
  • Given a function signature string, it tries to parse it as a Function
  • Given a function name, address, and args, tries to parse it as a Function by fetching the abi from etherscan. If the address is a proxy, fetches the ABI of the implementation contract.
  • Given an event without indexed parameters and a rawlog, it tries to return the event with the proper indexed parameters. Otherwise, it returns the original event.