Skip to content

Commit aad6fca

Browse files
committed
Add tests for ethdebug output on abstract contracts and interfaces
1 parent 33eadbd commit aad6fca

File tree

8 files changed

+133
-0
lines changed

8 files changed

+133
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--ethdebug --via-ir --pretty-json --json-indent 4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
pragma solidity >=0.0;
3+
4+
abstract contract C {
5+
function f() public virtual returns (bytes32);
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
======= Debug Data (ethdebug/format/info/resources) =======
2+
{
3+
"compilation": {
4+
"compiler": {
5+
"name": "solc",
6+
"version": "<VERSION REMOVED>"
7+
},
8+
"sources": [
9+
{
10+
"id": 0,
11+
"path": "input.sol"
12+
}
13+
]
14+
}
15+
}
16+
17+
======= input.sol:C =======
18+
Debug Data (ethdebug/format/program):
19+
null
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--ethdebug --via-ir --pretty-json --json-indent 4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
pragma solidity >=0.0;
3+
4+
interface C {
5+
function f() external;
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
======= Debug Data (ethdebug/format/info/resources) =======
2+
{
3+
"compilation": {
4+
"compiler": {
5+
"name": "solc",
6+
"version": "<VERSION REMOVED>"
7+
},
8+
"sources": [
9+
{
10+
"id": 0,
11+
"path": "input.sol"
12+
}
13+
]
14+
}
15+
}
16+
17+
======= input.sol:C =======
18+
Debug Data (ethdebug/format/program):
19+
null
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"language": "Solidity",
3+
"sources": {
4+
"a.sol": {
5+
"content": "// SPDX-License-Identifier: GPL-2.0\npragma solidity >=0.0;\n\nabstract contract C {\n function f() public virtual returns (bytes32);\n}\n"
6+
},
7+
"b.sol": {
8+
"content": "// SPDX-License-Identifier: GPL-2.0\npragma solidity >=0.0;\n\ninterface C {\n function f() external;\n}\n"
9+
}
10+
},
11+
"settings": {
12+
"viaIR": true,
13+
"debug": {
14+
"debugInfo": [
15+
"ethdebug"
16+
]
17+
},
18+
"outputSelection": {
19+
"*": {
20+
"*": [
21+
"evm.bytecode.ethdebug",
22+
"evm.deployedBytecode.ethdebug"
23+
]
24+
}
25+
}
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"contracts": {
3+
"a.sol": {
4+
"C": {
5+
"evm": {
6+
"bytecode": {
7+
"ethdebug": null
8+
},
9+
"deployedBytecode": {
10+
"ethdebug": null
11+
}
12+
}
13+
}
14+
},
15+
"b.sol": {
16+
"C": {
17+
"evm": {
18+
"bytecode": {
19+
"ethdebug": null
20+
},
21+
"deployedBytecode": {
22+
"ethdebug": null
23+
}
24+
}
25+
}
26+
}
27+
},
28+
"ethdebug": {
29+
"compilation": {
30+
"compiler": {
31+
"name": "solc",
32+
"version": "<VERSION REMOVED>"
33+
},
34+
"sources": [
35+
{
36+
"id": 0,
37+
"path": "a.sol"
38+
},
39+
{
40+
"id": 1,
41+
"path": "b.sol"
42+
}
43+
]
44+
}
45+
},
46+
"sources": {
47+
"a.sol": {
48+
"id": 0
49+
},
50+
"b.sol": {
51+
"id": 1
52+
}
53+
}
54+
}

0 commit comments

Comments
 (0)