Skip to content

0x73696d616f/StructGettersPOC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Returning a struct costs less gas than its items individually [POC]

Usage

Clone the repository.

Install foundry if not already installed https://book.getfoundry.sh/.

Run forge test -vv.

Results

Calling the getters individually or the whole struct produces the same storage accesses, but the gas cost is about 1000 gas less for the latter.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published