--- annotations_creators: [] language_creators: [] language: - en multilinguality: - monolingual pretty_name: Smart Contracts size_categories: - 100K Operator) internal operators;\n\n struct Operator {\n uint256 packedParams;\n address owner;\n address payable beneficiary;\n address authorizer;\n }\n\n...', 'class_documentation': '/// @title Stake Delegatable\n/// @notice A base contract to allow stake delegation for staking contracts.', 'class_documentation_type': 'NatSpecSingleLine', 'func_name': 'balanceOf', 'func_code': 'function balanceOf(address _address) public view returns (uint256 balance) {\n return operators[_address].packedParams.getAmount();\n }', 'func_documentation': '/// @notice Gets the stake balance of the specified address.\n/// @param _address The address to query the balance of.\n/// @return An uint256 representing the amount staked by the passed address.', 'func_documentation_type': 'NatSpecSingleLine', 'compiler_version': 'v0.5.17+commit.d19bba13', 'license_type': 'MIT', 'swarm_source': 'bzzr://63a152bdeccda501f3e5b77f97918c5500bb7ae07637beba7fae76dbe818bda4' } ``` ### Data Fields #### flattened - `contract_name` (`string`): containing the smart contract name. - `contract_address` (`string`): containing the Ethereum address for the smart contract. - `language` (`string`): containing the language of the smart contract. - `source_code ` (`string`): containing the source code of the smart contract. This contains all code needed for compilation of the contract, including libraries. - `abi` (`string`): containing the Application Binary Interface (ABI) of the smart contract. - `compiler_version` (`string`): containing the compiler version used to compile the smart contract. - `optimization_used` (`boolean`): indicating if the smart contract used optimization. - `runs` (`number`): containing the number of optimization steps used. - `constructor_arguments` (`string`): containing the constructor arguments of the smart contract. - `evm_version` (`string`): containing the EVM version used to compile the smart contract. - `library` (`string`): containing the `name:address` of libraries used separated by `;`. - `license_type` (`string`): containing the license type of the smart contract. - `proxy` (`boolean`): indicating if the smart contract is a proxy. - `implementation` (`string`): containing the implementation of the smart contract if it is a proxy. - `swarm_source` (`string`): containing the swarm source of the smart contract. #### flattened_extended Same fields as `flattened` but with the following additional fields: - `tx_count` (`number`): containing the number of transactions made to the smart contract. - `balance` (`string`): containing the ether balancce of the smart contract. #### flattened_plain_text - `text` (`string`): containing the source code of the smart contract. This contains all code needed for compilation of the contract, including libraries. - `language` (`string`): containing the language of the smart contract. #### inflated Same fields as `flattened` but with the following additional fields: - `file_path` (`string`): containing the original path to the file. #### inflated_plain_text - `text` (`string`): containing the source code of the smart contract. This contains all code needed for compilation of the contract, including libraries. - `language` (`string`): containing the language of the smart contract. #### parsed - `contract_name` (`string`): containing the smart contract name. - `file_path` (`string`): containing the original path to the file. - `contract_address` (`string`): containing the Ethereum address for the smart contract. - `language` (`string`): containing the language of the smart contract. - `class_name` (`string`): containing the name of the "class" (contract). - `class_code` (`string`): containing the source code of the "class" (contract). - `class_documentation` (`string`): containing the documentation (code comment) of the "class" (contract). - `class_documentation_type` (`string`): containing the documentation type of the "class" (contract). Can be one of: `NatSpecMultiLine`, `NatSpecSingleLine`, `LineComment` or `Comment`. - `func_name` (`string`): containing the name of the function definition. - `func_code` (`string`): containing the source code of the function. - `func_documentation` (`string`): containing the documentation (code comment) of the contract definition (or "class"). - `func_documentation_type` (`string`): containing the documentation type of the function. Can be one of: `NatSpecMultiLine`, `NatSpecSingleLine`, `LineComment` or `Comment`. - `compiler_version` (`string`): containing the compiler version used to compile the smart contract. - `license_type` (`string`): containing the license type of the smart contract. - `swarm_source` (`string`): containing the swarm source of the smart contract. ### Licensing Information All Smart Contracts in the dataset are publicly available, obtained by using [Etherscan APIs](https://etherscan.io/apis), and subject to their own original licenses. ### Citation ```bibtex @inproceedings{10301240, author={Storhaug, André and Li, Jingyue and Hu, Tianyuan}, booktitle={2023 IEEE 34th International Symposium on Software Reliability Engineering (ISSRE)}, title={Efficient Avoidance of Vulnerabilities in Auto-completed Smart Contract Code Using Vulnerability-constrained Decoding}, year={2023}, pages={683-693}, doi={10.1109/ISSRE59848.2023.00035} } ```