foundry icon indicating copy to clipboard operation
foundry copied to clipboard

In broadcast log, include arg names and use standard syntax

Open adhusson opened this issue 2 years ago • 0 comments

Component

Forge

Describe the feature you would like

Description

For now the function field of a broadcast log's transaction looks like:

"function": "functionName(type1,type2):(returnType)",

More useful and more standard (ie parseable by ethers.js' human-readable ABI parser) would be :

"function": "functionName(type1,type2 name2) returns (returnType)",

Differences:

  • The name of the argument is there when available (useful when the broadcat log is an input to a UI) (keeps more info)
  • : becomes returns (helps with parsing)

Alternative

Stay in full json and have something like

{
  "name":"functionName",
  "payable":false,
  "inputs":[{"type":"type1"},{"type":"type2", "name":"name2"}],
  "outputs":[{"type":"returnType"}]
}

Additional context

No response

adhusson avatar Dec 13 '22 17:12 adhusson