Tooling
ModuleKit
Reference
ERC-4337 Data Libs
sentinellist
sentinellisthelper
Findprevious

⚠️ Deprecation Notice

ModuleKit was developed by Rhinestone and is no longer actively supported. If you're building modules and need assistance, reach out to Rhinestone at gm@rhinestone.dev


title: "findPrevious"

Finds the previous entry in the list. Currently, this function will only work for the SentinelListLib.

Usage

address entries = new address[](2);
entries[0] = address(4);
entries[1] = address(5);
 
address entry = address(5);
 
address prev = findPrevious(entries, entry);

Parameters

array

  • Type: address[]

The array of entries.

entry

  • Type: address

The entry to find the previous entry for.

Returns

prev

  • Type: address

The previous entry in the list.