,
Emanuele De Angelis
,
Marco Di Ianni
,
Fabio Fioravanti
,
Pablo Gordillo
Creative Commons Attribution 4.0 International license
Testing has become an integral part of the software development process in order to ensure the correct and safe execution of programs. A powerful approach to testing is property-based testing that aims at generating unit tests that verify that a certain property of interest holds. However, smart contracts are also characterized by important non-functional aspects, such as the gas consumption required to execute their functions. Static gas analyzers are able to obtain parametric gas bounds - that soundly over-approximate - the gas consumption of executing each of the public functions within a smart contract. This paper discusses our ideas towards combining both formal methods, property-based testing and gas analysis, in order to generate gas-aware unit tests that can ensure the gas requirements provided by the programmers.
@InProceedings{albert_et_al:OASIcs.FMBC.2026.9,
author = {Albert, Elvira and De Angelis, Emanuele and Di Ianni, Marco and Fioravanti, Fabio and Gordillo, Pablo},
title = {{Towards Property-Based Testing of Smart Contracts Using Gas Analysis}},
booktitle = {7th International Workshop on Formal Methods for Blockchains (FMBC 2026)},
pages = {9:1--9:8},
series = {Open Access Series in Informatics (OASIcs)},
ISBN = {978-3-95977-424-6},
ISSN = {2190-6807},
year = {2026},
volume = {142},
editor = {Bartoletti, Massimo and Marmsoler, Diego},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/OASIcs.FMBC.2026.9},
URN = {urn:nbn:de:0030-drops-257069},
doi = {10.4230/OASIcs.FMBC.2026.9},
annote = {Keywords: Property-based Testing, Blockchain, Ethereum, Gas}
}