Skip to content

Commit d6c637f

Browse files
committed
Document prettyPrintLegacyAssemblyJSON in the README
1 parent 9aeaca2 commit d6c637f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,14 @@ var outputABI = abi.update('0.3.6', inputABI)
181181
// Output contains: [{"constant":false,"inputs":[],"name":"hello","outputs":[{"name":"","type":"string"}],"payable":true,"type":"function"},{"type":"fallback","payable":true}]
182182

183183
```
184+
185+
### Formatting old JSON assembly output
186+
187+
There is a helper available to format old JSON assembly output into a text familiar to earlier users of Remix IDE.
188+
189+
```
190+
var translate = require('solc/translate')
191+
192+
// assemblyJSON refers to the JSON of the given assembly and sourceCode is the source of which the assembly was generated from
193+
var output = translate.prettyPrintLegacyAssemblyJSON(assemblyJSON, sourceCode)
194+
```

0 commit comments

Comments
 (0)