Skip to content

Commit

Permalink
update fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroknots committed Sep 5, 2024
1 parent f657357 commit 840a645
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 16 deletions.
18 changes: 9 additions & 9 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
out = "out"
script = "script"
solc = "0.8.26"
src = "contracts"
src = "src"
test = "test"
cache_path = "cache_forge"
libs = ["node_modules", "lib"]
gas_reports_ignore = ["LockTest"]


[fmt]
bracket_spacing = true
int_types = "long"
line_length = 120
multiline_func_header = "all"
number_underscore = "thousands"
quote_style = "double"
tab_width = 4
wrap_comments = true
bracket_spacing = true
int_types = "long"
line_length = 120
multiline_func_header = "all"
number_underscore = "thousands"
quote_style = "double"
tab_width = 4
wrap_comments = true

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
1 change: 1 addition & 0 deletions src/AssociatedArrayLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ library AssociatedArrayLib {
}

function _get(Array storage s, address account, uint256 index) private view returns (bytes32 value) {
if (index >= _length(s, account)) revert AssociatedArray_OutOfBounds(index);
assembly {
mstore(0x00, account)
mstore(0x20, s.slot)
Expand Down
39 changes: 32 additions & 7 deletions src/EnumerableMap.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

pragma solidity ^0.8.20;

import {EnumerableSet} from "./EnumerableSet.sol";
import { EnumerableSet } from "./EnumerableSet.sol";

/**
* Fork of OZ's EnumerableSet that makes all storage access ERC-4337 compliant via associated storage
Expand Down Expand Up @@ -73,7 +73,12 @@ library EnumerableMap {
* Returns true if the key was added to the map, that is if it was not
* already present.
*/
function set(Bytes32ToBytes32Map storage map, address account, bytes32 key, bytes32 value)
function set(
Bytes32ToBytes32Map storage map,
address account,
bytes32 key,
bytes32 value
)
internal
returns (bool)
{
Expand Down Expand Up @@ -115,7 +120,11 @@ library EnumerableMap {
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32ToBytes32Map storage map, address account, uint256 index)
function at(
Bytes32ToBytes32Map storage map,
address account,
uint256 index
)
internal
view
returns (bytes32, bytes32)
Expand All @@ -128,7 +137,11 @@ library EnumerableMap {
* @dev Tries to returns the value associated with `key`. O(1).
* Does not revert if `key` is not in the map.
*/
function tryGet(Bytes32ToBytes32Map storage map, address account, bytes32 key)
function tryGet(
Bytes32ToBytes32Map storage map,
address account,
bytes32 key
)
internal
view
returns (bool, bytes32)
Expand Down Expand Up @@ -311,7 +324,11 @@ library EnumerableMap {
*
* - `index` must be strictly less than {length}.
*/
function at(UintToAddressMap storage map, address account, uint256 index)
function at(
UintToAddressMap storage map,
address account,
uint256 index
)
internal
view
returns (uint256, address)
Expand Down Expand Up @@ -409,7 +426,11 @@ library EnumerableMap {
*
* - `index` must be strictly less than {length}.
*/
function at(AddressToUintMap storage map, address account, uint256 index)
function at(
AddressToUintMap storage map,
address account,
uint256 index
)
internal
view
returns (address, uint256)
Expand Down Expand Up @@ -507,7 +528,11 @@ library EnumerableMap {
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32ToUintMap storage map, address account, uint256 index)
function at(
Bytes32ToUintMap storage map,
address account,
uint256 index
)
internal
view
returns (bytes32, uint256)
Expand Down

0 comments on commit 840a645

Please sign in to comment.