Farseen0/scar-weights
Feature Extraction • Updated
source large_stringclasses 5
values | contract_code large_stringlengths 884 1.24M | num_lines int64 42 25.8k | has_vuln_labels bool 2
classes | vuln_labels large_stringclasses 109
values | contract_hash large_stringlengths 64 64 |
|---|---|---|---|---|---|
slither-audited | pragma solidity 0.5.17;
pragma experimental ABIEncoderV2;
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks... | 3,009 | true | reentrancy|unchecked-calls|access-control|arithmetic|other | 50021bb7c36d83090595f944a541c3277e28bb9ecd45f8182c85902d412fc968 |
slither-audited | pragma solidity 0.6.12;
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among o... | 1,452 | true | other | 3c0d1855a4f61f703e10cb2d96bd77971139e1938ccad8075d4235892d37d7b3 |
slither-audited | "pragma solidity 0.5.15;\n\ncontract IFactRegistry {\n\n /*\n\n Returns true if the given fa(...TRUNCATED) | 855 | true | arithmetic | 5c79a8a1bfa53b069ad3e405f984371782f3e4a20b9c2e46c3c3f3eb49ab3099 |
slither-audited | "pragma solidity 0.6.12;\npragma experimental ABIEncoderV2;\n\nlibrary Address {\n\n function isCon(...TRUNCATED) | 1,629 | true | arithmetic|other | 02ee57c901b91a55ea619f4cebc99d006463d800f3533e7e5eec3ee7ecb0da84 |
slither-audited | "pragma solidity 0.5.4;\n\ninterface IERC20 {\n\n\n\n\n\n function balanceOf(address account) ext(...TRUNCATED) | 287 | true | arithmetic | 190b410af400485495d468623ffdd514e486f5c96eca65606f5b31b719211f8a |
slither-audited | "pragma solidity 0.6.10;\npragma experimental ABIEncoderV2;\n\nlibrary BokkyPooBahsDateTimeLibrary {(...TRUNCATED) | 4,600 | true | reentrancy|arithmetic|other | 8e307858f102e4f4e68aca322e382a01524fb9961f39ce5a2d2d24da3c0ff2c0 |
slither-audited | "pragma solidity 0.7.4;\n\nenum MathError { NO_ERROR, DIVISION_BY_ZERO, INTEGER_OVERFLOW, INTEGER_UN(...TRUNCATED) | 1,630 | true | unchecked-calls|other | 24e27dcc3a3251318cc81fdd9c3c4a3c79fb52b082b2de88457084eab65eb25a |
slither-audited | "pragma solidity 0.7.0;\n\ninterface IOwnershipTransferrable {\n\n\n function transferOwnership(add(...TRUNCATED) | 387 | true | reentrancy|arithmetic|other | 95f25afb4dc057a58015ff510a4ae5b25b2cf7457470d489c46a40c701fed922 |
slither-audited | "pragma solidity 0.7.0;\n\ninterface IOwnershipTransferrable {\n\n function transferOwnership(addre(...TRUNCATED) | 280 | true | reentrancy|arithmetic|unchecked-calls | f1a9da3fcfaa0458bae22c842473ce7f65097cdac514dec04fd189cae02dd7bc |
slither-audited | "pragma solidity 0.5.0;\n\ninterface IERC20 {\n\n function transfer(address to, uint256 value) ex(...TRUNCATED) | 527 | true | reentrancy|arithmetic | dec0f886345dbcdf6ef6aadd3a147dbde11dbdb55776e36cd81f6bdfb4fad9fd |
231,269 Solidity smart contracts for sparse retrieval over smart contract code. Used as the SAE pretraining corpus and the document collection for SCAR retrieval training and evaluation.
big-multilabel split (47k contracts with vulnerability labels)from datasets import load_dataset
ds = load_dataset("Farseen0/scar-corpus", split="train")
The corpus provides broad coverage of both benign and vulnerable Solidity patterns, ensuring the SAE learns features relevant to the full spectrum of smart contract code. Vulnerability classes represented include:
scar-pairs — 7,552 training pairs (uses this corpus as the document pool)scar-eval — 838 held-out evaluation pairsscar-weights — trained model weights (SAE pretrained on this corpus)This dataset accompanies SCAR: Sparse Code Audit Retriever via SAE-LoRA Adaptation (Farseen Shaikh, 2026).
@inproceedings{shaikh2026scar,
title = {SCAR: Sparse Code Audit Retriever via SAE-LoRA Adaptation},
author = {Shaikh, Farseen},
year = {2026},
note = {Under review at EMNLP 2026 (ACL ARR March cycle)},
url = {https://openreview.net/forum?id=moD8Hxq9hN}
}
Apache 2.0 — free for research and commercial use with attribution.