scholarly journals An Organized Repository of Ethereum Smart Contracts’ Source Codes and Metrics

2020 ◽  
Vol 12 (11) ◽  
pp. 197
Author(s):  
Giuseppe Antonio Pierro ◽  
Roberto Tonelli ◽  
Michele Marchesi

Many empirical software engineering studies show that there is a need for repositories where source codes are acquired, filtered and classified. During the last few years, Ethereum block explorer services have emerged as a popular project to explore and search for Ethereum blockchain data such as transactions, addresses, tokens, smart contracts’ source codes, prices and other activities taking place on the Ethereum blockchain. Despite the availability of this kind of service, retrieving specific information useful to empirical software engineering studies, such as the study of smart contracts’ software metrics, might require many subtasks, such as searching for specific transactions in a block, parsing files in HTML format, and filtering the smart contracts to remove duplicated code or unused smart contracts. In this paper, we afford this problem by creating Smart Corpus, a corpus of smart contracts in an organized, reasoned and up-to-date repository where Solidity source code and other metadata about Ethereum smart contracts can easily and systematically be retrieved. We present Smart Corpus’s design and its initial implementation, and we show how the data set of smart contracts’ source codes in a variety of programming languages can be queried and processed to get useful information on smart contracts and their software metrics. Smart Corpus aims to create a smart-contract repository where smart-contract data (source code, application binary interface (ABI) and byte code) are freely and immediately available and are classified based on the main software metrics identified in the scientific literature. Smart contracts’ source codes have been validated by EtherScan, and each contract comes with its own associated software metrics as computed by the freely available software PASO. Moreover, Smart Corpus can be easily extended as the number of new smart contracts increases day by day.

2018 ◽  
Vol 10 (11) ◽  
pp. 103 ◽  
Author(s):  
Simona Ibba ◽  
Andrea Pinna ◽  
Maria Lunesu ◽  
Michele Marchesi ◽  
Roberto Tonelli

An ICO (Initial Coin Offering) is an innovative way to fund projects based on blockchain. The funding is based on the selling of tokens by means of decentralized applications called smart contracts written in Solidity, a programming language specific for Ethereum blockchain. The ICOs work in a volatile context and it is crucial that the team is capable of handling constant changes. The Agile methods, proven practices enabling to develop software in presence of changing requirements, could be a means for managing uncertainty. The main goals of this work are to understand software engineering activities related to ICOs, recognize the ICOs developed using Agile methods, and make a comparison between ICOs and Agile ICOs. In addition, we perform a deeper analysis of Agile ICOs concerning project planning, software development, and code features. Our work shows that the roles of the people involved in an ICO can be compared to the typical roles of the SCRUM methodology. The majority of Agile ICOs use tool of testing before storing smart contract on blockchain. Finally, the application of volumetric and complexity software metrics shows that the files of Agile ICOs is on average shorter and less complex than in other smart contracts.


A number of software metrics estimate the complexity of software program by a couple of substantial software attributes and trends. Metric for measuring the reliability is extraordinary among the presently available complexity metrics by contemplating a non-physical attributes i.e. readability. Readability may be a key quality attribute for managing software source codes. Readability of the source code is mainly concerned with code maintainability which is a significant characteristic of software quality, mainly from the developers’ perspective. As the code is readable, the easier it is to modify, lesser errors, copious maintainable, easy to reuse and even more reliable. Readability is employed to enhance source codes for subsequent maintenance and extensibility. But code readability is not simply computable while dealing with open source software as contributors access the code and modify its structure according to his/her style of coding. This nature of development begins problems for the new contributors to understand the code structure. To enhance code readability, In this paper, we proposed a conceptual model of mining software repositories for software metrics in which we proposed a set of metrics for readability of the code that is easier to use and helpful to understand the code structure. We also mention a mechanism to validate the proposed metrics by the data extracted from the mining software repositories and comparing it with a survey conducting from experts working in industries


2007 ◽  
Vol 13 (1) ◽  
pp. 97-121 ◽  
Author(s):  
Barbara Kitchenham ◽  
Hiyam Al-Khilidar ◽  
Muhammed Ali Babar ◽  
Mike Berry ◽  
Karl Cox ◽  
...  

2020 ◽  
Vol 2020 ◽  
pp. 1-18
Author(s):  
Md. Mostafizer Rahman ◽  
Yutaka Watanobe ◽  
Keita Nakamura

In recent years, millions of source codes are generated in different languages on a daily basis all over the world. A deep neural network-based intelligent support model for source code completion would be a great advantage in software engineering and programming education fields. Vast numbers of syntax, logical, and other critical errors that cannot be detected by normal compilers continue to exist in source codes, and the development of an intelligent evaluation methodology that does not rely on manual compilation has become essential. Even experienced programmers often find it necessary to analyze an entire program in order to find a single error and are thus being forced to waste valuable time debugging their source codes. With this point in mind, we proposed an intelligent model that is based on long short-term memory (LSTM) and combined it with an attention mechanism for source code completion. Thus, the proposed model can detect source code errors with locations and then predict the correct words. In addition, the proposed model can classify the source codes as to whether they are erroneous or not. We trained our proposed model using the source code and then evaluated the performance. All of the data used in our experiments were extracted from Aizu Online Judge (AOJ) system. The experimental results obtained show that the accuracy in terms of error detection and prediction of our proposed model approximately is 62% and source code classification accuracy is approximately 96% which outperformed a standard LSTM and other state-of-the-art models. Moreover, in comparison to state-of-the-art models, our proposed model achieved an interesting level of success in terms of error detection, prediction, and classification when applied to long source code sequences. Overall, these experimental results indicate the usefulness of our proposed model in software engineering and programming education arena.


2020 ◽  
Author(s):  
Ammar Battah ◽  
Mohammad Madine ◽  
Hamad Alzaabi ◽  
Ibrar Yaqoob ◽  
Khaled Salah ◽  
...  

Multi-party authorization (MPA) typically involves multiple parties to control and grant access to shared data. MPA is used to solve the insider’s attack problem by ensuring that a single authority or party is not acting alone. Currently, almost all existing implementations of MPA are centralized and fall short in providing logs and events related to provenance of granting permissions in a trusted, secure, immutable, auditable, and decentralized manner. Moreover, for sharing data, proxy re-encryption algorithms are often used to give secure access to encrypted shared data. These schemes and algorithms are also centralized and cannot be trusted. In this paper, we propose a fully decentralized blockchain-based solution in which MPA is implemented using Ethereum smart contracts, and proxy re-encryption algorithms (which are computationally expensive) are implemented using multiple oracles to give access to encrypted shared data stored on a public and decentralized storage platform, such as the Interplanetary File Systems (IPFS). The smart contracts help to validate results based on the majority of encrypted results determined by the oracles. For this, we incorporate reputation mechanisms in the proposed smart contracts to rate the oracles based on their malicious and non-malicious behaviors. We present algorithms along with their full implementation, testing, and validation details. We evaluate the proposed system in terms of security, cost, and generalization to show its reliability and practicality. We make the smart contract source code publicly available on Github.


Sign in / Sign up

Export Citation Format

Share Document