Skip to content

to fix `.transfer()` methods directed to gnosis safe because of berlin hardfork (aka fix eip-2929 with eip-2930)

Notifications You must be signed in to change notification settings

folia-app/eip-2929

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fix eip 2929 with eip 2930

After the berlin hardfork eip 2929 was added which increased the cost for state access opcodes. This broke any contract which used address.transfer(eth) to gnosis safes because the hard-coded 2300 gas was no longer enough to execute the transaction. In order to help contracts that were affected they made eip 2930 which adds an access list to the transaction. Any address added to this access list has gas prepaid on their behalf as part of the total gas calculation. This reduces the gas required when interacting with them which allows the original 2300 gas to succeed.

Note: Apparently this only works with ethers at the moment.

For our situation we needed to run endAuction(11000003) on our auction contract that would allow the transfer to two different gnosis safes to occur.

Look at ./index.js for a complete example.

(shout out @rmeissner for the help here)

About

to fix `.transfer()` methods directed to gnosis safe because of berlin hardfork (aka fix eip-2929 with eip-2930)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published