Skip to content

erc7579/enumerablemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libraries for ERC-4337 compatible dynamic arrays in storage.

Motivation

Dynamic array are not easily compatible with ERC-4337 associated storage access rules. Even if they are a value in a mapping, where the Smart Account address is the key, the final keccak won't be keccak(A||x)+n as it would be for a static array, but keccak(keccak(A||x))+n instead.

What's included

  • AssociatedArrayLib.sol: Library for dynamic arrays that are associated with an address as per ERC-7562. It is achieved by using keccak(A||x) as the starting slot for the array.
  • EnumerableSet4337.sol: Fork of OZ's EnumerableSet that makes all storage access ERC-4337 compliant via associated storage. Stores indexes in a mapping making access to a given value easier.
  • EnumerableMap4337.sol: Library for managing an enumerable variant of Solidity's mapping type.

Disclaimer

These libraries are provided as-is, without any warranty or guarantee of any kind. Use them at your own risk.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published