Skip to content

Commit e27858d

Browse files
committed
Update numeric literals for guidelines consistency
1 parent 2088e8e commit e27858d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contracts/utils/RLP.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ library RLP {
115115
function encode(bool input) internal pure returns (bytes memory result) {
116116
assembly ("memory-safe") {
117117
result := mload(0x40)
118-
mstore(result, 1) // length of the encoded data: 1 byte
118+
mstore(result, 0x01) // length of the encoded data: 1 byte
119119
mstore8(add(result, 0x20), add(mul(iszero(input), 0x7f), 1)) // input
120120
mstore(0x40, add(result, 0x21)) // reserve memory
121121
}
@@ -130,7 +130,7 @@ library RLP {
130130
function encode(address input) internal pure returns (bytes memory result) {
131131
assembly ("memory-safe") {
132132
result := mload(0x40)
133-
mstore(result, 21) // length of the encoded data: 1 (prefix) + 0x14 (address)
133+
mstore(result, 0x15) // length of the encoded data: 1 (prefix) + 0x14 (address)
134134
mstore(add(result, 0x20), or(shl(248, 0x94), shl(88, input))) // prefix (0x94 = SHORT_OFFSET + 0x14) + input
135135
mstore(0x40, add(result, 0x35)) // reserve memory
136136
}

0 commit comments

Comments
 (0)