Add experimental support to import AST via Standard JSON.

This commit is contained in:
Alexander Arlt
2023-05-09 14:07:38 -05:00
parent d370f53b7e
commit 4837d42361
13 changed files with 436 additions and 82 deletions
@@ -0,0 +1,50 @@
{
"language": "SolidityAST",
"sources": {
"A": {
"ast": {
"absolutePath": "empty_contract.sol",
"exportedSymbols": {
"test": [
1
]
},
"id": 2,
"nodeType": "SourceUnit",
"nodes": [
{
"abstract": false,
"baseContracts": [],
"canonicalName": "test",
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 1,
"linearizedBaseContracts": [
1
],
"name": "test",
"nameLocation": "9:4:0",
"nodeType": "ContractDefinition",
"nodes": [],
"scope": 2,
"src": "0:17:0",
"usedErrors": []
}
],
"src": "0:124:0"
},
"id": 0
}
},
"settings": {
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.bytecode.sourceMap"
]
}
}
}
}
@@ -0,0 +1,30 @@
{
"contracts":
{
"A":
{
"test":
{
"evm":
{
"bytecode":
{
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "<BYTECODE REMOVED>",
"opcodes":"<OPCODES REMOVED>",
"sourceMap":"<SOURCEMAP REMOVED>"
}
}
}
}
},
"sources":
{
"A":
{
"id": 0
}
}
}