1

Is there a tool to generate readable documentation given a ABI json file? For example let's say I have this simple ABI:

[
{
    "inputs": [],
    "name": "retrieve",
    "outputs": [
        {
            "internalType": "uint256",
            "name": "",
            "type": "uint256"
        }
    ],
    "stateMutability": "view",
    "type": "function"
},
{
    "inputs": [
        {
            "internalType": "uint256",
            "name": "num",
            "type": "uint256"
        }
    ],
    "name": "store",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
}
]

This ABI only has two actions and it's easy to navigate. But if you work with large ABI's it's hard to find what you are looking for. I feel there has to be something but I just haven't found it. Something like https://swagger.io/docs/ for API's. Any suggestions?

1 Answer 1

1

Something like this:

"type" - "constructor", "function", "event"
"name" - method or event name
"inputs" - list of method or constructor parameters
"outputs" - list of return values for method (for functions)
"stateMutability" - special modifiers: view, nonpayable, etc. (for functions or constructor)

Оptionally:
"constant" - true/false (for functions)
"payable" - true/false (for functions or constructor)
"anonymous" - true/false (for events)
2
  • Yes, something like that! Do you know any tools?
    – Stanko
    Dec 17, 2021 at 7:43
  • My brain and fingers :-)
    – Mad Jackal
    Dec 17, 2021 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.