Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosnacks committed Jun 30, 2023
1 parent ff8b5cf commit def293d
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions test/mocks/abstracts/ImplementationState.sol
Original file line number Diff line number Diff line change
Expand Up @@ -217,28 +217,4 @@ abstract contract ImplementationState is ReflexState {
_IMPLEMENTATION_STORAGE().tokens[tokenB_].symbol = "TKNB";
_IMPLEMENTATION_STORAGE().tokens[tokenB_].decimals = 18;
}

// =========
// Utilities
// =========

function sload(bytes32 slot_) public view returns (bytes32 result_) {
assembly ("memory-safe") {
result_ := sload(slot_)
}
}

function sload(bytes32 startSlot_, uint256 slotCount_) public view returns (bytes memory result_) {
result_ = new bytes(32 * slotCount_);

assembly ("memory-safe") {
for {
let i := 0
} lt(i, slotCount_) {
i := add(i, 1)
} {
mstore(add(result_, mul(add(i, 1), 32)), sload(add(startSlot_, i)))
}
}
}
}

0 comments on commit def293d

Please sign in to comment.