regenrate expected json for tests

pull/67/head
Alexander Remie 6 years ago
parent 4cb3a13eb1
commit d8c21daf45
  1. 24
      tests/expected_json/arbitrary_send.arbitrary-send.json
  2. 10
      tests/expected_json/backdoor.backdoor.json
  3. 14
      tests/expected_json/backdoor.suicidal.json
  4. 68
      tests/expected_json/const_state_variables.constable-states.json
  5. 56
      tests/expected_json/external_function.external-function.json
  6. 10
      tests/expected_json/inline_assembly_contract.assembly.json
  7. 20
      tests/expected_json/inline_assembly_library.assembly.json
  8. 12
      tests/expected_json/locked_ether.locked-ether.json
  9. 10
      tests/expected_json/low_level_calls.low-level-calls.json
  10. 166
      tests/expected_json/naming_convention.naming-convention.json
  11. 10
      tests/expected_json/old_solc.sol.json.solc-version.json
  12. 18
      tests/expected_json/pragma.0.4.24.pragma.json
  13. 24
      tests/expected_json/reentrancy.reentrancy.json
  14. 20
      tests/expected_json/tx_origin.tx-origin.json
  15. 88
      tests/expected_json/uninitialized.uninitialized-state.json
  16. 22
      tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json
  17. 14
      tests/expected_json/unused_state.unused-state.json

@ -2,25 +2,25 @@
{
"calls": [
"msg.sender.send(this.balance)"
],
"contract": "Test",
"filename": "tests/arbitrary_send.sol",
"func": "direct",
],
"contract": "Test",
"filename": "tests/arbitrary_send.sol",
"func": "direct",
"sourceMapping": [
null
],
],
"vuln": "SuicidalFunc"
},
},
{
"calls": [
"destination.send(this.balance)"
],
"contract": "Test",
"filename": "tests/arbitrary_send.sol",
"func": "indirect",
],
"contract": "Test",
"filename": "tests/arbitrary_send.sol",
"func": "indirect",
"sourceMapping": [
null
],
],
"vuln": "SuicidalFunc"
}
]
]

@ -1,11 +1,11 @@
[
{
"contract": "C",
"contract": "C",
"sourceMapping": {
"filename": "tests/backdoor.sol",
"length": 74,
"filename": "tests/backdoor.sol",
"length": 74,
"start": 42
},
},
"vuln": "backdoor"
}
]
]

@ -1,13 +1,13 @@
[
{
"contract": "C",
"filename": "tests/backdoor.sol",
"func": "i_am_a_backdoor",
"contract": "C",
"filename": "tests/backdoor.sol",
"func": "i_am_a_backdoor",
"sourceMapping": {
"filename": "tests/backdoor.sol",
"length": 74,
"filename": "tests/backdoor.sol",
"length": 74,
"start": 42
},
},
"vuln": "SuicidalFunc"
}
]
]

@ -1,64 +1,64 @@
[
{
"contract": "B",
"filename": "tests/const_state_variables.sol",
"contract": "B",
"filename": "tests/const_state_variables.sol",
"sourceMapping": [
{
"filename": "tests/const_state_variables.sol",
"length": 76,
"filename": "tests/const_state_variables.sol",
"length": 76,
"start": 130
},
},
{
"filename": "tests/const_state_variables.sol",
"length": 20,
"filename": "tests/const_state_variables.sol",
"length": 20,
"start": 235
},
},
{
"filename": "tests/const_state_variables.sol",
"length": 20,
"filename": "tests/const_state_variables.sol",
"length": 20,
"start": 331
},
},
{
"filename": "tests/const_state_variables.sol",
"length": 76,
"filename": "tests/const_state_variables.sol",
"length": 76,
"start": 494
}
],
],
"unusedVars": [
"myFriendsAddress",
"test",
"myFriendsAddress",
"test",
"text2"
],
],
"vuln": "ConstStateVariableCandidates"
},
},
{
"contract": "B",
"filename": "tests/const_state_variables.sol",
"contract": "B",
"filename": "tests/const_state_variables.sol",
"sourceMapping": [
{
"filename": "tests/const_state_variables.sol",
"length": 76,
"filename": "tests/const_state_variables.sol",
"length": 76,
"start": 130
},
},
{
"filename": "tests/const_state_variables.sol",
"length": 20,
"filename": "tests/const_state_variables.sol",
"length": 20,
"start": 235
},
},
{
"filename": "tests/const_state_variables.sol",
"length": 20,
"filename": "tests/const_state_variables.sol",
"length": 20,
"start": 331
},
},
{
"filename": "tests/const_state_variables.sol",
"length": 76,
"filename": "tests/const_state_variables.sol",
"length": 76,
"start": 494
}
],
],
"unusedVars": [
"mySistersAddress"
],
],
"vuln": "ConstStateVariableCandidates"
}
]
]

@ -1,46 +1,46 @@
[
{
"contract": "ContractWithFunctionNotCalled",
"filename": "tests/external_function.sol",
"func": "funcNotCalled",
"contract": "ContractWithFunctionNotCalled",
"filename": "tests/external_function.sol",
"func": "funcNotCalled",
"sourceMapping": {
"filename": "tests/external_function.sol",
"length": 40,
"filename": "tests/external_function.sol",
"length": 40,
"start": 351
},
},
"vuln": "ExternalFunc"
},
},
{
"contract": "ContractWithFunctionNotCalled",
"filename": "tests/external_function.sol",
"func": "funcNotCalled2",
"contract": "ContractWithFunctionNotCalled",
"filename": "tests/external_function.sol",
"func": "funcNotCalled2",
"sourceMapping": {
"filename": "tests/external_function.sol",
"length": 41,
"filename": "tests/external_function.sol",
"length": 41,
"start": 304
},
},
"vuln": "ExternalFunc"
},
},
{
"contract": "ContractWithFunctionNotCalled",
"filename": "tests/external_function.sol",
"func": "funcNotCalled3",
"contract": "ContractWithFunctionNotCalled",
"filename": "tests/external_function.sol",
"func": "funcNotCalled3",
"sourceMapping": {
"filename": "tests/external_function.sol",
"length": 41,
"filename": "tests/external_function.sol",
"length": 41,
"start": 257
},
},
"vuln": "ExternalFunc"
},
},
{
"contract": "ContractWithFunctionNotCalled2",
"filename": "tests/external_function.sol",
"func": "funcNotCalled",
"contract": "ContractWithFunctionNotCalled2",
"filename": "tests/external_function.sol",
"func": "funcNotCalled",
"sourceMapping": {
"filename": "tests/external_function.sol",
"length": 304,
"filename": "tests/external_function.sol",
"length": 304,
"start": 552
},
},
"vuln": "ExternalFunc"
}
]
]

@ -1,11 +1,11 @@
[
{
"contract": "GetCode",
"filename": "tests/inline_assembly_contract.sol",
"function_name": "at",
"contract": "GetCode",
"filename": "tests/inline_assembly_contract.sol",
"function_name": "at",
"sourceMapping": [
null
],
],
"vuln": "Assembly"
}
]
]

@ -1,20 +1,20 @@
[
{
"contract": "VectorSum",
"filename": "tests/inline_assembly_library.sol",
"function_name": "sumAsm",
"contract": "VectorSum",
"filename": "tests/inline_assembly_library.sol",
"function_name": "sumAsm",
"sourceMapping": [
null
],
],
"vuln": "Assembly"
},
},
{
"contract": "VectorSum",
"filename": "tests/inline_assembly_library.sol",
"function_name": "sumPureAsm",
"contract": "VectorSum",
"filename": "tests/inline_assembly_library.sol",
"function_name": "sumPureAsm",
"sourceMapping": [
null
],
],
"vuln": "Assembly"
}
]
]

@ -1,16 +1,16 @@
[
{
"contract": "OnlyLocked",
"contract": "OnlyLocked",
"functions_payable": [
"receive"
],
],
"sourceMapping": [
{
"filename": "tests/locked_ether.sol",
"length": 72,
"filename": "tests/locked_ether.sol",
"length": 72,
"start": 46
}
],
],
"vuln": "LockedEther"
}
]
]

@ -1,11 +1,11 @@
[
{
"contract": "Sender",
"filename": "tests/low_level_calls.sol",
"function_name": "send",
"contract": "Sender",
"filename": "tests/low_level_calls.sol",
"function_name": "send",
"sourceMapping": [
null
],
],
"vuln": "Low level call"
}
]
]

@ -1,131 +1,131 @@
[
{
"argument": "_used",
"contract": "T",
"filename": "tests/naming_convention.sol",
"function": "test",
"argument": "_used",
"contract": "T",
"filename": "tests/naming_convention.sol",
"function": "test",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 10,
"filename": "tests/naming_convention.sol",
"length": 10,
"start": 748
},
},
"vuln": "NamingConvention"
},
},
{
"contract": "T",
"filename": "tests/naming_convention.sol",
"contract": "T",
"filename": "tests/naming_convention.sol",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 17,
"filename": "tests/naming_convention.sol",
"length": 17,
"start": 695
},
"variable": "_myPublicVar",
},
"variable": "_myPublicVar",
"vuln": "NamingConvention"
},
},
{
"constant": "l",
"contract": "T",
"filename": "tests/naming_convention.sol",
"constant": "l",
"contract": "T",
"filename": "tests/naming_convention.sol",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 10,
"filename": "tests/naming_convention.sol",
"length": 10,
"start": 847
},
},
"vuln": "NamingConvention"
},
},
{
"contract": "naming",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"filename": "tests/naming_convention.sol",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 598,
"filename": "tests/naming_convention.sol",
"length": 598,
"start": 26
},
},
"vuln": "NamingConvention"
},
},
{
"contract": "naming",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"filename": "tests/naming_convention.sol",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 20,
"filename": "tests/naming_convention.sol",
"length": 20,
"start": 227
},
"struct": "test",
},
"struct": "test",
"vuln": "NamingConvention"
},
},
{
"contract": "naming",
"event": "event_",
"filename": "tests/naming_convention.sol",
"sourceMapping": null,
"contract": "naming",
"event": "event_",
"filename": "tests/naming_convention.sol",
"sourceMapping": null,
"vuln": "NamingConvention"
},
},
{
"contract": "naming",
"filename": "tests/naming_convention.sol",
"function": "GetOne",
"contract": "naming",
"filename": "tests/naming_convention.sol",
"function": "GetOne",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 71,
"filename": "tests/naming_convention.sol",
"length": 71,
"start": 405
},
},
"vuln": "NamingConvention"
},
},
{
"argument": "Number2",
"contract": "naming",
"filename": "tests/naming_convention.sol",
"function": "setInt",
"argument": "Number2",
"contract": "naming",
"filename": "tests/naming_convention.sol",
"function": "setInt",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 12,
"filename": "tests/naming_convention.sol",
"length": 12,
"start": 512
},
},
"vuln": "NamingConvention"
},
},
{
"constant": "MY_other_CONSTANT",
"contract": "naming",
"filename": "tests/naming_convention.sol",
"constant": "MY_other_CONSTANT",
"contract": "naming",
"filename": "tests/naming_convention.sol",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 35,
"filename": "tests/naming_convention.sol",
"length": 35,
"start": 141
},
},
"vuln": "NamingConvention"
},
},
{
"contract": "naming",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"filename": "tests/naming_convention.sol",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 16,
"filename": "tests/naming_convention.sol",
"length": 16,
"start": 183
},
"variable": "Var_One",
},
"variable": "Var_One",
"vuln": "NamingConvention"
},
},
{
"contract": "naming",
"enum": "numbers",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"enum": "numbers",
"filename": "tests/naming_convention.sol",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 23,
"filename": "tests/naming_convention.sol",
"length": 23,
"start": 77
},
},
"vuln": "NamingConvention"
},
},
{
"contract": "naming",
"filename": "tests/naming_convention.sol",
"modifier": "CantDo",
"contract": "naming",
"filename": "tests/naming_convention.sol",
"modifier": "CantDo",
"sourceMapping": {
"filename": "tests/naming_convention.sol",
"length": 36,
"filename": "tests/naming_convention.sol",
"length": 36,
"start": 545
},
},
"vuln": "NamingConvention"
}
]
]

@ -2,14 +2,14 @@
{
"pragma": [
"0.4.21"
],
],
"sourceMapping": [
{
"filename": "old_solc.sol",
"length": 23,
"filename": "old_solc.sol",
"length": 23,
"start": 0
}
],
],
"vuln": "OldPragma"
}
]
]

@ -2,20 +2,20 @@
{
"sourceMapping": [
{
"filename": "tests/pragma.0.4.23.sol",
"length": 24,
"filename": "tests/pragma.0.4.23.sol",
"length": 24,
"start": 0
},
},
{
"filename": "tests/pragma.0.4.24.sol",
"length": 23,
"filename": "tests/pragma.0.4.24.sol",
"length": 23,
"start": 0
}
],
],
"versions": [
"0.4.24",
"0.4.24",
"^0.4.23"
],
],
"vuln": "ConstantPragma"
}
]
]

@ -2,25 +2,25 @@
{
"calls": [
"! (msg.sender.call.value(userBalance[msg.sender])())"
],
"contract": "Reentrancy",
"filename": "tests/reentrancy.sol",
"function_name": "withdrawBalance()",
],
"contract": "Reentrancy",
"filename": "tests/reentrancy.sol",
"function_name": "withdrawBalance()",
"send_eth": [
"! (msg.sender.call.value(userBalance[msg.sender])())"
],
],
"sourceMapping": [
{
"filename": "tests/reentrancy.sol",
"length": 37,
"filename": "tests/reentrancy.sol",
"length": 37,
"start": 52
},
null,
},
null,
null
],
],
"varsWritten": [
"userBalance"
],
],
"vuln": "Reentrancy"
}
]
]

@ -1,20 +1,20 @@
[
{
"contract": "TxOrigin",
"filename": "tests/tx_origin.sol",
"function_name": "bug0",
"contract": "TxOrigin",
"filename": "tests/tx_origin.sol",
"function_name": "bug0",
"sourceMapping": [
null
],
],
"vuln": "TxOrigin"
},
},
{
"contract": "TxOrigin",
"filename": "tests/tx_origin.sol",
"function_name": "bug2",
"contract": "TxOrigin",
"filename": "tests/tx_origin.sol",
"function_name": "bug2",
"sourceMapping": [
null
],
],
"vuln": "TxOrigin"
}
]
]

@ -1,86 +1,86 @@
[
{
"contract": "Test",
"filename": "tests/uninitialized.sol",
"contract": "Test",
"filename": "tests/uninitialized.sol",
"functions": [
"use"
],
],
"sourceMapping": [
{
"filename": "tests/uninitialized.sol",
"length": 34,
"filename": "tests/uninitialized.sol",
"length": 34,
"start": 189
},
},
{
"filename": "tests/uninitialized.sol",
"length": 143,
"filename": "tests/uninitialized.sol",
"length": 143,
"start": 356
}
],
"variable": "balances",
],
"variable": "balances",
"vuln": "UninitializedStateVars"
},
},
{
"contract": "Test2",
"filename": "tests/uninitialized.sol",
"contract": "Test2",
"filename": "tests/uninitialized.sol",
"functions": [
"use"
],
],
"sourceMapping": [
{
"filename": "tests/uninitialized.sol",
"length": 15,
"filename": "tests/uninitialized.sol",
"length": 15,
"start": 695
},
},
{
"filename": "tests/uninitialized.sol",
"length": 117,
"filename": "tests/uninitialized.sol",
"length": 117,
"start": 875
}
],
"variable": "st",
],
"variable": "st",
"vuln": "UninitializedStateVars"
},
},
{
"contract": "Test2",
"filename": "tests/uninitialized.sol",
"contract": "Test2",
"filename": "tests/uninitialized.sol",
"functions": [
"init"
],
],
"sourceMapping": [
{
"filename": "tests/uninitialized.sol",
"length": 6,
"filename": "tests/uninitialized.sol",
"length": 6,
"start": 748
},
},
{
"filename": "tests/uninitialized.sol",
"length": 52,
"filename": "tests/uninitialized.sol",
"length": 52,
"start": 817
}
],
"variable": "v",
],
"variable": "v",
"vuln": "UninitializedStateVars"
},
},
{
"contract": "Uninitialized",
"filename": "tests/uninitialized.sol",
"contract": "Uninitialized",
"filename": "tests/uninitialized.sol",
"functions": [
"transfer"
],
],
"sourceMapping": [
{
"filename": "tests/uninitialized.sol",
"length": 19,
"filename": "tests/uninitialized.sol",
"length": 19,
"start": 55
},
},
{
"filename": "tests/uninitialized.sol",
"length": 82,
"filename": "tests/uninitialized.sol",
"length": 82,
"start": 81
}
],
"variable": "destination",
],
"variable": "destination",
"vuln": "UninitializedStateVars"
}
]
]

@ -1,21 +1,21 @@
[
{
"contract": "Uninitialized",
"filename": "tests/uninitialized_storage_pointer.sol",
"function": "func",
"contract": "Uninitialized",
"filename": "tests/uninitialized_storage_pointer.sol",
"function": "func",
"sourceMapping": [
{
"filename": "tests/uninitialized_storage_pointer.sol",
"length": 138,
"filename": "tests/uninitialized_storage_pointer.sol",
"length": 138,
"start": 67
},
},
{
"filename": "tests/uninitialized_storage_pointer.sol",
"length": 9,
"filename": "tests/uninitialized_storage_pointer.sol",
"length": 9,
"start": 171
}
],
"variable": "st_bug",
],
"variable": "st_bug",
"vuln": "UninitializedStorageVars"
}
]
]

@ -1,17 +1,17 @@
[
{
"contract": "B",
"filename": "tests/unused_state.sol",
"contract": "B",
"filename": "tests/unused_state.sol",
"sourceMapping": [
{
"filename": "tests/unused_state.sol",
"length": 14,
"filename": "tests/unused_state.sol",
"length": 14,
"start": 41
}
],
],
"unusedVars": [
"unused"
],
],
"vuln": "unusedStateVars"
}
]
]
Loading…
Cancel
Save