Optimizing Gas Consumption in Ethereum Smart Contracts: Best Practices and Techniques.

Sourena Khanzadeh, Noama Fatima Samreen,Manar H. Alalfi

International Conference on Software Quality, Reliability and Security(2023)

引用 0|浏览1
暂无评分
摘要
Full-fledged applications, known as “smart contracts,” may be executed on blockchains. At this time, the quantity of Ethereum smart contracts written in the Solidity programming language is skyrocketing. The cost for executing smart contract code is measured using gas. Gas is used to allocate resources of the Ethereum virtual machine (EVM) so that wallet transactions and smart contract transactions can self-execute. Complicated transactions involving smart contracts require more computational work, so they require a higher gas amount than a simple payment. Optimizing smart contract code is an important practice in software engineering smart contracts and that to reduce gas consumption and, in some instances, to even avoid malicious attacks. This means that reducing the cost of gas consumption in smart contracts is important for anyone who use it, including developers. For inexperienced programmers, learning the mechanics of a smart contract and blockchain technology may be a considerable hurdle when it comes to gas optimization. In this paper, we present around 28 gas efficient patterns with examples in solidity, providing data on how much gas each pattern saves. We provide a categorization of those code patterns and a comparison between the state of the art tools used to address the problem of gas optimization in smart contracts.
更多
查看译文
关键词
ethereum,smart contracts,gas optimization
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要