You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contracts/common/StorageAccessible.sol
+14-15Lines changed: 14 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,21 @@
2
2
pragma solidity>=0.7.0<0.9.0;
3
3
4
4
/**
5
-
* @title StorageAccessible - A generic base contract that allows callers to access all internal storage.
6
-
* @notice See https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol
7
-
* It removes a method from the original contract not needed for the Safe Smart Account contracts.
5
+
* @title Storage Accessible
6
+
* @notice A generic base contract that allows callers to access all internal storage.
7
+
* @dev See <https://github.com/gnosis/util-contracts/blob/bb5fe5fb5df6d8400998094fb1b32a178a47c3a1/contracts/StorageAccessible.sol>
8
+
* It removes a method from the original contract not needed for the Safe Smart Account contracts.
8
9
* @author Gnosis Developers
9
10
*/
10
11
abstractcontractStorageAccessible {
11
12
/**
12
13
* @notice Reads `length` bytes of storage in the current contract
13
-
* @param offset - the offset in the current contract's storage in words to start reading from
14
-
* @param length - the number of words (32 bytes) of data to read
15
-
* @return the bytes that were read.
14
+
* @param offset The offset in the current contract's storage in words to start reading from.
15
+
* @param length The number of words (32 bytes) of data to read.
16
+
* @return The bytes that were read.
16
17
*/
17
18
function getStorageAt(uint256offset, uint256length) publicviewreturns (bytesmemory) {
18
-
// We use `<< 5` instead of `* 32` as SHR / SHL opcode only uses 3 gas, while DIV / MUL opcode uses 5 gas.
19
+
// We use `<< 5` instead of the equivalent `* 32` as `SHL` opcode only uses 3 gas, while the `MUL` opcode uses 5 gas.
0 commit comments