Skip to content

Commit

Permalink
Adding support for link (http?s) extraction from source code includin…
Browse files Browse the repository at this point in the history
…g social recognition (#126)
  • Loading branch information
0x19 authored Oct 17, 2023
1 parent 993fc9b commit 0b5ad75
Show file tree
Hide file tree
Showing 19 changed files with 382 additions and 53 deletions.
2 changes: 1 addition & 1 deletion data/solc/releases/releases.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/tests/audits/ERC20.slither.raw.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/tests/audits/Lottery.slither.raw.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/tests/audits/SimpleStorage.slither.raw.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/tests/audits/TokenSale.slither.raw.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/tests/audits/VulnerableBank.slither.raw.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13454,10 +13454,10 @@
},
"member_name": "get",
"argument_types": [],
"referenced_declaration": 1501,
"referenced_declaration": 910,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
"type_identifier": "t_contract$_IterableMapping_$2131",
"type_string": "contract IterableMapping"
}
},
"type_description": {
Expand Down Expand Up @@ -13899,8 +13899,8 @@
}
},
"type_description": {
"type_identifier": "t_struct$_Global_Order_$2494",
"type_string": "struct Global.Order"
"type_identifier": "t_contract$_IterableMapping_$2131",
"type_string": "contract IterableMapping"
}
}
],
Expand Down Expand Up @@ -14199,10 +14199,10 @@
},
"member_name": "set",
"argument_types": [],
"referenced_declaration": 1343,
"referenced_declaration": 2307,
"type_description": {
"type_identifier": "t_contract$_IterableMapping_$2131",
"type_string": "contract IterableMapping"
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint128$_t_struct$_IterableMapping_Order_$2147$",
"type_string": "function(struct IterableMapping.Map,uint128,struct IterableMapping.Order)"
}
},
"type_description": {
Expand Down Expand Up @@ -15084,7 +15084,7 @@
},
"member_name": "remove",
"argument_types": [],
"referenced_declaration": 1226,
"referenced_declaration": 1398,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
Expand Down Expand Up @@ -15379,7 +15379,7 @@
},
"member_name": "size",
"argument_types": [],
"referenced_declaration": 2274,
"referenced_declaration": 1555,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$",
"type_string": "function(struct IterableMapping.Map)"
Expand Down Expand Up @@ -15766,7 +15766,7 @@
},
"member_name": "getKeyAtIndex",
"argument_types": [],
"referenced_declaration": 2241,
"referenced_declaration": 1874,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint32$",
"type_string": "function(struct IterableMapping.Map,uint32)"
Expand Down Expand Up @@ -15953,7 +15953,7 @@
},
"member_name": "get",
"argument_types": [],
"referenced_declaration": 2206,
"referenced_declaration": 1720,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
Expand Down Expand Up @@ -16285,7 +16285,7 @@
},
"member_name": "remove",
"argument_types": [],
"referenced_declaration": 1226,
"referenced_declaration": 1398,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
Expand Down Expand Up @@ -16543,7 +16543,7 @@
},
"member_name": "size",
"argument_types": [],
"referenced_declaration": 1448,
"referenced_declaration": 1637,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$",
"type_string": "function(struct IterableMapping.Map)"
Expand Down Expand Up @@ -17031,7 +17031,7 @@
},
"member_name": "remove",
"argument_types": [],
"referenced_declaration": 1226,
"referenced_declaration": 1398,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
Expand Down Expand Up @@ -17286,7 +17286,7 @@
},
"member_name": "size",
"argument_types": [],
"referenced_declaration": 1448,
"referenced_declaration": 1808,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$",
"type_string": "function(struct IterableMapping.Map)"
Expand Down Expand Up @@ -18128,10 +18128,10 @@
},
"member_name": "get",
"argument_types": [],
"referenced_declaration": 910,
"referenced_declaration": 2206,
"type_description": {
"type_identifier": "t_contract$_IterableMapping_$2131",
"type_string": "contract IterableMapping"
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint128$",
"type_string": "function(struct IterableMapping.Map,uint128)"
}
},
"type_description": {
Expand Down Expand Up @@ -19003,7 +19003,7 @@
},
"member_name": "size",
"argument_types": [],
"referenced_declaration": 1448,
"referenced_declaration": 2274,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$",
"type_string": "function(struct IterableMapping.Map)"
Expand Down Expand Up @@ -19658,7 +19658,7 @@
},
"member_name": "getKeyAtIndex",
"argument_types": [],
"referenced_declaration": 1484,
"referenced_declaration": 2241,
"type_description": {
"type_identifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint32$",
"type_string": "function(struct IterableMapping.Map,uint32)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13395,7 +13395,7 @@
},
"memberName": "get",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "1501",
"referencedDeclaration": "910",
"src": {
"column": "46",
"end": "15247",
Expand All @@ -13406,8 +13406,8 @@
"start": "15230"
},
"typeDescription": {
"typeIdentifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint128$",
"typeString": "function(struct IterableMapping.Map,uint128)"
"typeIdentifier": "t_contract$_IterableMapping_$2131",
"typeString": "contract IterableMapping"
}
}
},
Expand Down Expand Up @@ -13843,8 +13843,8 @@
"start": "15380"
},
"typeDescription": {
"typeIdentifier": "t_struct$_Global_Order_$2494",
"typeString": "struct Global.Order"
"typeIdentifier": "t_contract$_IterableMapping_$2131",
"typeString": "contract IterableMapping"
}
}
}
Expand Down Expand Up @@ -14168,7 +14168,7 @@
},
"memberName": "set",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "1343",
"referencedDeclaration": "2307",
"src": {
"column": "8",
"end": "15551",
Expand All @@ -14179,8 +14179,8 @@
"start": "15534"
},
"typeDescription": {
"typeIdentifier": "t_contract$_IterableMapping_$2131",
"typeString": "contract IterableMapping"
"typeIdentifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint128$_t_struct$_IterableMapping_Order_$2147$",
"typeString": "function(struct IterableMapping.Map,uint128,struct IterableMapping.Order)"
}
}
},
Expand Down Expand Up @@ -15055,7 +15055,7 @@
},
"memberName": "remove",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "1226",
"referencedDeclaration": "1398",
"src": {
"column": "8",
"end": "15964",
Expand Down Expand Up @@ -15335,7 +15335,7 @@
},
"memberName": "size",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "2274",
"referencedDeclaration": "1555",
"src": {
"column": "29",
"end": "16090",
Expand Down Expand Up @@ -15524,7 +15524,7 @@
},
"memberName": "getKeyAtIndex",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "2241",
"referencedDeclaration": "1874",
"src": {
"column": "30",
"end": "16203",
Expand Down Expand Up @@ -15719,7 +15719,7 @@
},
"memberName": "get",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "2206",
"referencedDeclaration": "1720",
"src": {
"column": "50",
"end": "16276",
Expand Down Expand Up @@ -15850,7 +15850,7 @@
},
"memberName": "remove",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "1226",
"referencedDeclaration": "1398",
"src": {
"column": "16",
"end": "16393",
Expand Down Expand Up @@ -16524,7 +16524,7 @@
},
"memberName": "size",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "1448",
"referencedDeclaration": "1637",
"src": {
"column": "29",
"end": "16536",
Expand Down Expand Up @@ -16828,7 +16828,7 @@
},
"memberName": "remove",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "1226",
"referencedDeclaration": "1398",
"src": {
"column": "12",
"end": "16687",
Expand Down Expand Up @@ -17283,7 +17283,7 @@
},
"memberName": "size",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "1448",
"referencedDeclaration": "1808",
"src": {
"column": "29",
"end": "16845",
Expand Down Expand Up @@ -17951,7 +17951,7 @@
},
"memberName": "get",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "910",
"referencedDeclaration": "2206",
"src": {
"column": "50",
"end": "17163",
Expand All @@ -17962,8 +17962,8 @@
"start": "17146"
},
"typeDescription": {
"typeIdentifier": "t_contract$_IterableMapping_$2131",
"typeString": "contract IterableMapping"
"typeIdentifier": "t_function_$_t_struct$_IterableMapping_Map_$2174$_t_uint128$",
"typeString": "function(struct IterableMapping.Map,uint128)"
}
}
},
Expand Down Expand Up @@ -19078,7 +19078,7 @@
},
"memberName": "size",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "1448",
"referencedDeclaration": "2274",
"src": {
"column": "29",
"end": "17623",
Expand Down Expand Up @@ -19551,7 +19551,7 @@
},
"memberName": "getKeyAtIndex",
"nodeType": "MEMBER_ACCESS",
"referencedDeclaration": "1484",
"referencedDeclaration": "2241",
"src": {
"column": "30",
"end": "17869",
Expand Down
17 changes: 17 additions & 0 deletions data/tests/ir/ERC20.ir.json
Original file line number Diff line number Diff line change
Expand Up @@ -82006,5 +82006,22 @@
}
]
}
],
"links": [
{
"location": "https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522",
"is_social": true,
"network": "github"
},
{
"location": "https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729",
"is_social": true,
"network": "github"
},
{
"location": "https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226",
"is_social": false,
"network": ""
}
]
}
3 changes: 2 additions & 1 deletion data/tests/ir/Empty.ir.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"contracts_count": 0,
"contract_types": [],
"standards": [],
"contracts": []
"contracts": [],
"links": null
}
3 changes: 2 additions & 1 deletion data/tests/ir/Lottery.ir.json
Original file line number Diff line number Diff line change
Expand Up @@ -35907,5 +35907,6 @@
"parameters": []
}
}
]
],
"links": []
}
3 changes: 2 additions & 1 deletion data/tests/ir/SimpleStorage.ir.json
Original file line number Diff line number Diff line change
Expand Up @@ -12970,5 +12970,6 @@
}
]
}
]
],
"links": []
}
12 changes: 12 additions & 0 deletions data/tests/ir/TokenSale.ir.json
Original file line number Diff line number Diff line change
Expand Up @@ -35774,5 +35774,17 @@
}
]
}
],
"links": [
{
"location": "https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729",
"is_social": true,
"network": "github"
},
{
"location": "https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522",
"is_social": true,
"network": "github"
}
]
}
Loading

0 comments on commit 0b5ad75

Please sign in to comment.