--- 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. ### Data Splits [More Information Needed] ## Dataset Creation ### Curation Rationale [More Information Needed] ### Source Data #### Initial Data Collection and Normalization [More Information Needed] #### Who are the source language producers? [More Information Needed] ### Annotations #### Annotation process [More Information Needed] #### Who are the annotators? [More Information Needed] ### Personal and Sensitive Information [More Information Needed] ## Considerations for Using the Data ### Social Impact of Dataset [More Information Needed] ### Discussion of Biases [More Information Needed] ### Other Known Limitations [More Information Needed] ## Additional Information ### Dataset Curators [More Information Needed] ### Licensing Information [More Information Needed] ### Citation Information ```bibtex @misc{storhaug2023efficient, title={Efficient Avoidance of Vulnerabilities in Auto-completed Smart Contract Code Using Vulnerability-constrained Decoding}, author={André Storhaug and Jingyue Li and Tianyuan Hu}, year={2023}, eprint={2309.09826}, archivePrefix={arXiv}, primaryClass={cs.CR} } ``` ### Contributions Thanks to [@andstor](https://github.com/andstor) for adding this dataset.