Skip to content

Commit 9943fdd

Browse files
fmt
1 parent cd6d658 commit 9943fdd

10 files changed

Lines changed: 36 additions & 30 deletions

File tree

‎src/interface/IInterpreterCallerV3.sol‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ pragma solidity ^0.8.18;
77
import {IParserV2} from "./IParserV2.sol";
88
import {IInterpreterStoreV2} from "./IInterpreterStoreV2.sol";
99
import {IInterpreterV3} from "./IInterpreterV3.sol";
10-
import
11-
// Exported for convenience.
12-
//forge-lint: disable-start(unused-import)
13-
{
10+
import {
11+
12+
// Exported for convenience.
13+
//forge-lint: disable-start(unused-import)
1414
SignedContextV1,
1515
SIGNED_CONTEXT_SIGNER_OFFSET,
1616
SIGNED_CONTEXT_CONTEXT_OFFSET,
1717
SIGNED_CONTEXT_SIGNATURE_OFFSET
1818
} from "./deprecated/IInterpreterCallerV2.sol";
19+
1920
//forge-lint: disable-end
2021

2122
/// Struct over the return of `IParserV2.parse2` which MAY be more convenient to

‎src/interface/IInterpreterV3.sol‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,36 @@ pragma solidity ^0.8.18;
55
import {
66
IInterpreterStoreV2,
77
FullyQualifiedNamespace,
8+
89
// Exported for convenience.
910
//forge-lint: disable-next-line(unused-import)
1011
StateNamespace,
1112
SourceIndexV2,
13+
1214
// Exported for convenience.
1315
//forge-lint: disable-next-line(unused-import)
1416
DEFAULT_STATE_NAMESPACE,
17+
1518
// Exported for convenience.
1619
//forge-lint: disable-next-line(unused-import)
1720
Operand,
21+
1822
// Exported for convenience.
1923
//forge-lint: disable-next-line(unused-import)
2024
OPCODE_CONSTANT,
25+
2126
// Exported for convenience.
2227
//forge-lint: disable-next-line(unused-import)
2328
OPCODE_CONTEXT,
29+
2430
// Exported for convenience.
2531
//forge-lint: disable-next-line(unused-import)
2632
OPCODE_EXTERN,
33+
2734
// Exported for convenience.
2835
//forge-lint: disable-next-line(unused-import)
2936
OPCODE_UNKNOWN,
37+
3038
// Exported for convenience.
3139
//forge-lint: disable-next-line(unused-import)
3240
OPCODE_STACK

‎src/interface/deprecated/IInterpreterExternV1.sol‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,5 @@ interface IInterpreterExternV1 {
1919
/// Analogous to the opcode/operand in the interpreter.
2020
/// @param inputs The array of inputs for the dispatched logic.
2121
/// @return outputs The result of the dispatched logic.
22-
function extern(ExternDispatch dispatch, uint256[] memory inputs)
23-
external
24-
view
25-
returns (uint256[] memory outputs);
22+
function extern(ExternDispatch dispatch, uint256[] memory inputs) external view returns (uint256[] memory outputs);
2623
}

‎src/interface/unstable/IInterpreterCallerV4.sol‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ pragma solidity ^0.8.18;
77
import {IParserV2} from "../IParserV2.sol";
88
import {IInterpreterStoreV3} from "./IInterpreterStoreV3.sol";
99
import {IInterpreterV4} from "./IInterpreterV4.sol";
10-
import
11-
// Exported for convenience.
12-
//forge-lint: disable-start(unused-import)
13-
{
10+
import {
11+
12+
// Exported for convenience.
13+
//forge-lint: disable-start(unused-import)
1414
SignedContextV1,
1515
SIGNED_CONTEXT_SIGNER_OFFSET,
1616
SIGNED_CONTEXT_CONTEXT_OFFSET,
1717
SIGNED_CONTEXT_SIGNATURE_OFFSET
1818
} from "../IInterpreterCallerV3.sol";
19+
1920
//forge-lint: disable-end
2021

2122
/// @param interpreter Will evaluate the expression.

‎src/interface/unstable/IInterpreterV4.sol‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,32 @@ pragma solidity ^0.8.25;
44

55
import {
66
FullyQualifiedNamespace,
7+
78
// Exported for convenience.
89
//forge-lint: disable-next-line(unused-import)
910
StateNamespace,
1011
SourceIndexV2,
12+
1113
// Exported for convenience.
1214
//forge-lint: disable-next-line(unused-import)
1315
DEFAULT_STATE_NAMESPACE,
16+
1417
// Exported for convenience.
1518
//forge-lint: disable-next-line(unused-import)
1619
OPCODE_CONSTANT,
20+
1721
// Exported for convenience.
1822
//forge-lint: disable-next-line(unused-import)
1923
OPCODE_CONTEXT,
24+
2025
// Exported for convenience.
2126
//forge-lint: disable-next-line(unused-import)
2227
OPCODE_EXTERN,
28+
2329
// Exported for convenience.
2430
//forge-lint: disable-next-line(unused-import)
2531
OPCODE_UNKNOWN,
32+
2633
// Exported for convenience.
2734
//forge-lint: disable-next-line(unused-import)
2835
OPCODE_STACK
@@ -91,8 +98,5 @@ interface IInterpreterV4 {
9198
/// unless/until they are set to something else in the evaluated logic.
9299
/// - Numbers are treated as packed Rain decimal floats, NOT fixed point
93100
/// decimals.
94-
function eval4(EvalV4 calldata eval)
95-
external
96-
view
97-
returns (StackItem[] calldata stack, bytes32[] calldata writes);
101+
function eval4(EvalV4 calldata eval) external view returns (StackItem[] calldata stack, bytes32[] calldata writes);
98102
}

‎src/lib/caller/LibContext.sol‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ library LibContext {
192192
// a single encoded output.
193193
!SignatureChecker.isValidSignatureNow(
194194
signedContexts[i].signer,
195-
MessageHashUtils.toEthSignedMessageHash(LibHashNoAlloc.hashWords(signedContexts[i].context)),
195+
MessageHashUtils.toEthSignedMessageHash(
196+
LibHashNoAlloc.hashWords(signedContexts[i].context)
197+
),
196198
signedContexts[i].signature
197199
)
198200
) {

‎src/lib/deprecated/caller/LibEncodedDispatch.sol‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ library LibEncodedDispatch {
2929
// values to uint16.
3030
return EncodedDispatch.wrap(
3131
(uint256(uint160(expression)) << 0x20) | (uint256(uint16(SourceIndexV2.unwrap(sourceIndex))) << 0x10)
32-
// forge-lint: disable-next-line(unsafe-typecast)
33-
| uint256(uint16(maxOutputs))
32+
// forge-lint: disable-next-line(unsafe-typecast)
33+
| uint256(uint16(maxOutputs))
3434
);
3535
}
3636

‎test/src/lib/bytecode/LibBytecode.checkNoOOBPointers.t.sol‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ contract LibBytecodeCheckNoOOBPointersTest is BytecodeTest {
4848

4949
/// If the relative offsets are truncated the bytecode fails as
5050
/// `TruncatedHeaderOffsets`.
51-
function testCheckNoOOBPointersOffsetsTruncated(bytes memory bytecode, uint8 sourceCount, uint256 length)
52-
external
53-
{
51+
function testCheckNoOOBPointersOffsetsTruncated(bytes memory bytecode, uint8 sourceCount, uint256 length) external {
5452
vm.assume(sourceCount > 0);
5553
vm.assume(bytecode.length > 0);
5654
bytecode[0] = bytes1(sourceCount);

‎test/src/lib/bytecode/LibBytecode.sourcePointer.t.sol‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ import {LibBytecodeSlow} from "test/src/lib/bytecode/LibBytecodeSlow.sol";
88
import {Pointer} from "rain.solmem/lib/LibPointer.sol";
99

1010
contract LibBytecodeSourcePointerTest is BytecodeTest {
11-
function sourcePointerExternal(bytes memory bytecode, uint256 sourceIndex)
12-
external
13-
pure
14-
returns (Pointer pointer)
15-
{
11+
function sourcePointerExternal(bytes memory bytecode, uint256 sourceIndex) external pure returns (Pointer pointer) {
1612
return LibBytecode.sourcePointer(bytecode, sourceIndex);
1713
}
1814

‎test/src/lib/bytecode/LibBytecodeSlow.sol‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ library LibBytecodeSlow {
2929
}
3030

3131
function sourcePointerSlow(bytes memory bytecode, uint256 sourceIndex) internal pure returns (Pointer) {
32-
return bytecode.dataPointer().unsafeAddBytes(
33-
sourceRelativeOffsetSlow(bytecode, sourceIndex) + 1 + sourceCountSlow(bytecode) * 2
34-
);
32+
return bytecode.dataPointer()
33+
.unsafeAddBytes(sourceRelativeOffsetSlow(bytecode, sourceIndex) + 1 + sourceCountSlow(bytecode) * 2);
3534
}
3635

3736
/// source count is the top byte of the first word of the source header.

0 commit comments

Comments
 (0)