Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d97502d
Move targetting to framework
dstallenberg Dec 2, 2021
2d2336c
Fix formatting
dstallenberg Dec 2, 2021
8cc9eaa
Change framework dependency
dstallenberg Dec 2, 2021
4f9e815
Add includes and excludes directly to the targetpool
dstallenberg Dec 3, 2021
1588616
Formatting
dstallenberg Dec 3, 2021
6f68fa3
Move temp_test_folder property
dstallenberg Dec 3, 2021
92624d7
Formatting
dstallenberg Dec 3, 2021
330536b
Merge
dstallenberg Dec 3, 2021
547d0e0
Add More abstractions
dstallenberg Dec 5, 2021
ed55349
Refactor sampling
dstallenberg Dec 5, 2021
f471955
Formatting
dstallenberg Dec 5, 2021
c609099
move-testcase-specific-code-out-of-framework
dstallenberg Dec 14, 2021
473e668
Formatting
dstallenberg Dec 14, 2021
04e86d7
Move all testcase related code to the solidity part
dstallenberg Dec 23, 2021
66f3c0c
Formatting
dstallenberg Dec 23, 2021
48d0834
Resolve comments
dstallenberg Jan 2, 2022
e94b190
Remove targetFile
dstallenberg Jan 18, 2022
8a04659
Fix wrong decoding bug
dstallenberg Jan 18, 2022
b61e148
Fix merge conflicts
dstallenberg Jan 26, 2022
280cb7b
Fix merge conflicts
dstallenberg Jan 26, 2022
7f47b55
Fix merge conflicts
dstallenberg Jan 26, 2022
70f9a68
Format
dstallenberg Jan 26, 2022
70844dd
Add language specific implementations to solidity
dstallenberg Dec 9, 2022
8b2ad60
Update to accomodate for new framework version
dstallenberg Dec 10, 2022
8a69d59
Replace contractPath with path
dstallenberg Dec 12, 2022
b32c65b
Remove enters
dstallenberg Dec 12, 2022
67fb72a
Add enters
dstallenberg Dec 12, 2022
25bce2e
Add space
dstallenberg Dec 12, 2022
d96502f
Add space
dstallenberg Dec 12, 2022
2fe8851
Resolve merge conflicts
dstallenberg Dec 12, 2022
f413544
Remove spaces
dstallenberg Dec 12, 2022
084fb21
Update copyright headers
dstallenberg Dec 12, 2022
eefc567
Update copyright headers year
dstallenberg Dec 12, 2022
b8af3f7
Update copyright headers project
dstallenberg Dec 12, 2022
45e9a39
Update licence year
dstallenberg Dec 12, 2022
441ca8f
Fix reporting bugs
dstallenberg Dec 12, 2022
b22b839
Improve instrumentation method
dstallenberg Dec 12, 2022
ff99a84
Fix contract visitor to always provide a function map for a contract
dstallenberg Dec 12, 2022
37e0754
Replace package.json package
dstallenberg Dec 12, 2022
f40eeed
Merge branch 'move-testcase-specific-code-out-of-framework' into 123-…
dstallenberg Dec 12, 2022
1aecb8c
Update solidity parser
dstallenberg Dec 12, 2022
8f81726
Accomodate for new solidity parser type structure
dstallenberg Dec 12, 2022
58f34b3
Lock truffle version
dstallenberg Dec 12, 2022
57b1c7b
Repair reporter
dstallenberg Dec 12, 2022
104d449
Merge branch 'move-testcase-specific-code-out-of-framework' into 123-…
dstallenberg Dec 12, 2022
0b290bb
Merge branch '123-update-licence-year' into 127-update-dependencies
dstallenberg Dec 12, 2022
0612b6c
Merge branch 'development' into 127-update-dependencies
mitchellolsthoorn Dec 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"test:watch": "mocha --watch"
},
"dependencies": {
"@solidity-parser/parser": "^0.6.0",
"@solidity-parser/parser": "0.14.5",
"@syntest/framework": "^0.1.2",
"@truffle/config": "^1.2.44",
"@truffle/provider": "^0.1.17",
Expand All @@ -68,7 +68,7 @@
"sc-istanbul": "^0.4.5",
"semver": "^7.3.5",
"solidity-coverage": "^0.7.16",
"truffle": "^5.1.65",
"truffle": "5.1.65",
"web3": "^1.3.4",
"web3-utils": "^1.5.2"
},
Expand Down
10 changes: 4 additions & 6 deletions src/analysis/static/SolidityVisitor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
Visitor,
SourceUnit,
PragmaDirective,
ImportDirective,
Expand Down Expand Up @@ -48,7 +47,6 @@ import {
AssemblyLiteral,
SubAssembly,
TupleExpression,
TypeNameExpression,
StringLiteral,
NumberLiteral,
BooleanLiteral,
Expand All @@ -61,9 +59,11 @@ import {
HexNumber,
DecimalNumber,
Continue,
} from "@solidity-parser/parser";
} from "@solidity-parser/parser/dist/src/ast-types";

export interface SolidityVisitor extends Visitor {
import { ASTVisitor } from "@solidity-parser/parser/dist/src/ast-types";

export interface SolidityVisitor extends ASTVisitor {
SourceUnit?: (node: SourceUnit) => void;
PragmaDirective?: (node: PragmaDirective) => void;
ImportDirective?: (node: ImportDirective) => void;
Expand Down Expand Up @@ -112,7 +112,6 @@ export interface SolidityVisitor extends Visitor {
AssemblyLiteral?: (node: AssemblyLiteral) => void;
SubAssembly?: (node: SubAssembly) => void;
TupleExpression?: (node: TupleExpression) => void;
TypeNameExpression?: (node: TypeNameExpression) => void;
StringLiteral?: (node: StringLiteral) => void;
NumberLiteral?: (node: NumberLiteral) => void;
BooleanLiteral?: (node: BooleanLiteral) => void;
Expand Down Expand Up @@ -178,7 +177,6 @@ export interface SolidityVisitor extends Visitor {
"AssemblyLiteral:exit"?: (node: AssemblyLiteral) => void;
"SubAssembly:exit"?: (node: SubAssembly) => void;
"TupleExpression:exit"?: (node: TupleExpression) => void;
"TypeNameExpression:exit"?: (node: TypeNameExpression) => void;
"NumberLiteral:exit"?: (node: NumberLiteral) => void;
"BooleanLiteral:exit"?: (node: BooleanLiteral) => void;
"Identifier:exit"?: (node: Identifier) => void;
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/static/dependency/ImportVisitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

import { SolidityVisitor } from "../SolidityVisitor";
import { ImportDirective } from "@solidity-parser/parser";
import { ImportDirective } from "@solidity-parser/parser/dist/src/ast-types";

/**
* Visits the AST nodes of a contract to find all import statements
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/static/dependency/LibraryVisitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { SolidityVisitor } from "../SolidityVisitor";
import {
ContractDefinition,
FunctionDefinition,
} from "@solidity-parser/parser";
} from "@solidity-parser/parser/dist/src/ast-types";

/**
* Visits the AST nodes of a contract to find all libraries with public and external functions.
Expand Down
18 changes: 12 additions & 6 deletions src/analysis/static/map/ContractVisitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
ContractDefinition,
FunctionDefinition,
TypeName,
} from "@solidity-parser/parser";
} from "@solidity-parser/parser/dist/src/ast-types";
import { ContractMetadata, ContractKind } from "./ContractMetadata";
import {
ContractFunction,
Expand Down Expand Up @@ -209,9 +209,15 @@ export class ContractVisitor implements SolidityVisitor {
break;
}
case "Mapping": {
paramType = `Map<${type.keyType.name},${this.resolveTypes(
type.valueType
)}>`;
if (type.keyType.type === 'ElementaryTypeName') {
paramType = `Map<${type.keyType.name},${this.resolveTypes(
type.valueType
)}>`;
} else {
paramType = `Map<${type.keyType.namePath},${this.resolveTypes(
type.valueType
)}>`;
}
break;
}
case "ArrayTypeName": {
Expand All @@ -221,13 +227,13 @@ export class ContractVisitor implements SolidityVisitor {
case "FunctionTypeName": {
const parameterTypes = type.parameterTypes
.map((param) => {
return this.resolveTypes(param);
return param.name;
})
.join(",");

const returnTypes = type.returnTypes
.map((param) => {
return this.resolveTypes(param);
return param.name;
})
.join(",");

Expand Down
2 changes: 1 addition & 1 deletion src/seeding/constant/ConstantVisitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
MemberAccess,
HexNumber,
DecimalNumber,
} from "@solidity-parser/parser";
} from "@solidity-parser/parser/dist/src/ast-types";
import { ConstantPool } from "./ConstantPool";

/**
Expand Down