Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 38 additions & 21 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions foundry.lock
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"lib/forge-std": {
"rev": "b8f065fda83b8cd94a6b2fec8fcd911dc3b444fd"
"rev": "1801b0541f4fda118a10798fd3486bb7051c5dd6"
},
"lib/openzeppelin-contracts": {
"rev": "fcbae5394ae8ad52d8e580a3477db99814b9d565"
},
"lib/rain.intorastring": {
"rev": "f92fa66a5f8601bee55692488a198c0a79715707"
"rev": "a494f480aa480539b524a255a151d55f667b372f"
},
"lib/rain.lib.hash": {
"rev": "9677b7063fc9ae8c580636760474719d910c2134"
"rev": "a4f6df6fb74b7d14d94fb8f0477888cc23616bc3"
},
"lib/rain.lib.typecast": {
"rev": "1eaa22e7290f97903daed752aa28d0d646e0199b"
"rev": "32c07c3cbc6de578c1750cefd714248de04b9c6d"
},
"lib/rain.math.binary": {
"rev": "f44f846a43928ba0a7ed4a7bb810a8933e23cce1"
"rev": "122a490bb1869c7533f108cb8b371d75de9db60f"
},
"lib/rain.math.float": {
"rev": "150f48bb909dd5f8970726d515c87c5257107699"
"rev": "1cf3969996be4cde836b77972b257b4eee7bd6d9"
},
"lib/rain.sol.codegen": {
"rev": "bd7993b3f6b301e5a667ff687f25b80fdda878cd"
"rev": "dfe95884edfde3d4faf51046dc392aa9221bb0a7"
},
"lib/rain.solmem": {
"rev": "f28da2f09d42d154783cb53c138a7ef2f3a9eb4a"
"rev": "2e47e41af85a711d837b2518656db0efdae814c2"
}
}
2 changes: 1 addition & 1 deletion lib/forge-std
Submodule forge-std updated 57 files
+14 −31 .github/workflows/ci.yml
+1 −1 .github/workflows/sync.yml
+2 −2 CONTRIBUTING.md
+11 −9 README.md
+3 −12 foundry.toml
+2 −2 package.json
+2 −12 scripts/vm.py
+2 −2 src/Base.sol
+1 −1 src/Config.sol
+2 −2 src/LibVariable.sol
+2 −2 src/Script.sol
+28 −13 src/StdAssertions.sol
+8 −5 src/StdChains.sol
+9 −13 src/StdCheats.sol
+24 −4 src/StdConfig.sol
+2 −2 src/StdConstants.sol
+2 −2 src/StdError.sol
+2 −4 src/StdInvariant.sol
+4 −12 src/StdJson.sol
+2 −2 src/StdMath.sol
+11 −9 src/StdStorage.sol
+2 −2 src/StdStyle.sol
+4 −12 src/StdToml.sol
+5 −13 src/StdUtils.sol
+2 −4 src/Test.sol
+26 −41 src/Vm.sol
+10 −19 src/console.sol
+2 −2 src/console2.sol
+2 −2 src/interfaces/IERC1155.sol
+2 −2 src/interfaces/IERC165.sol
+2 −2 src/interfaces/IERC20.sol
+2 −2 src/interfaces/IERC4626.sol
+2 −2 src/interfaces/IERC6909.sol
+2 −2 src/interfaces/IERC721.sol
+4 −10 src/interfaces/IERC7540.sol
+2 −2 src/interfaces/IERC7575.sol
+3 −8 src/interfaces/IMulticall3.sol
+691 −1,380 src/safeconsole.sol
+2 −2 test/CommonBase.t.sol
+34 −5 test/Config.t.sol
+19 −1 test/LibVariable.t.sol
+2 −2 test/StdAssertions.t.sol
+24 −24 test/StdChains.t.sol
+19 −20 test/StdCheats.t.sol
+2 −2 test/StdConstants.t.sol
+3 −4 test/StdError.t.sol
+2 −2 test/StdJson.t.sol
+6 −6 test/StdMath.t.sol
+24 −27 test/StdStorage.t.sol
+2 −2 test/StdStyle.t.sol
+2 −2 test/StdToml.t.sol
+13 −13 test/StdUtils.t.sol
+3 −3 test/Vm.t.sol
+2 −4 test/compilation/CompilationScript.sol
+2 −4 test/compilation/CompilationScriptBase.sol
+2 −4 test/compilation/CompilationTest.sol
+2 −4 test/compilation/CompilationTestBase.sol
9 changes: 5 additions & 4 deletions src/interface/IInterpreterCallerV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ pragma solidity ^0.8.18;
import {IParserV2} from "./IParserV2.sol";
import {IInterpreterStoreV2} from "./IInterpreterStoreV2.sol";
import {IInterpreterV3} from "./IInterpreterV3.sol";
import
// Exported for convenience.
//forge-lint: disable-start(unused-import)
{
import {

// Exported for convenience.
//forge-lint: disable-start(unused-import)
SignedContextV1,
SIGNED_CONTEXT_SIGNER_OFFSET,
SIGNED_CONTEXT_CONTEXT_OFFSET,
SIGNED_CONTEXT_SIGNATURE_OFFSET
} from "./deprecated/IInterpreterCallerV2.sol";

//forge-lint: disable-end

/// Struct over the return of `IParserV2.parse2` which MAY be more convenient to
Expand Down
8 changes: 8 additions & 0 deletions src/interface/IInterpreterV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,36 @@ pragma solidity ^0.8.18;
import {
IInterpreterStoreV2,
FullyQualifiedNamespace,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
StateNamespace,
SourceIndexV2,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
DEFAULT_STATE_NAMESPACE,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
Operand,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_CONSTANT,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_CONTEXT,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_EXTERN,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_UNKNOWN,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_STACK
Expand Down
5 changes: 1 addition & 4 deletions src/interface/deprecated/IInterpreterExternV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,5 @@ interface IInterpreterExternV1 {
/// Analogous to the opcode/operand in the interpreter.
/// @param inputs The array of inputs for the dispatched logic.
/// @return outputs The result of the dispatched logic.
function extern(ExternDispatch dispatch, uint256[] memory inputs)
external
view
returns (uint256[] memory outputs);
function extern(ExternDispatch dispatch, uint256[] memory inputs) external view returns (uint256[] memory outputs);
}
9 changes: 5 additions & 4 deletions src/interface/unstable/IInterpreterCallerV4.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ pragma solidity ^0.8.18;
import {IParserV2} from "../IParserV2.sol";
import {IInterpreterStoreV3} from "./IInterpreterStoreV3.sol";
import {IInterpreterV4} from "./IInterpreterV4.sol";
import
// Exported for convenience.
//forge-lint: disable-start(unused-import)
{
import {

// Exported for convenience.
//forge-lint: disable-start(unused-import)
SignedContextV1,
SIGNED_CONTEXT_SIGNER_OFFSET,
SIGNED_CONTEXT_CONTEXT_OFFSET,
SIGNED_CONTEXT_SIGNATURE_OFFSET
} from "../IInterpreterCallerV3.sol";

//forge-lint: disable-end

/// @param interpreter Will evaluate the expression.
Expand Down
12 changes: 8 additions & 4 deletions src/interface/unstable/IInterpreterV4.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,32 @@ pragma solidity ^0.8.25;

import {
FullyQualifiedNamespace,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
StateNamespace,
SourceIndexV2,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
DEFAULT_STATE_NAMESPACE,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_CONSTANT,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_CONTEXT,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_EXTERN,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_UNKNOWN,

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_STACK
Expand Down Expand Up @@ -91,8 +98,5 @@ interface IInterpreterV4 {
/// unless/until they are set to something else in the evaluated logic.
/// - Numbers are treated as packed Rain decimal floats, NOT fixed point
/// decimals.
function eval4(EvalV4 calldata eval)
external
view
returns (StackItem[] calldata stack, bytes32[] calldata writes);
function eval4(EvalV4 calldata eval) external view returns (StackItem[] calldata stack, bytes32[] calldata writes);
}
4 changes: 3 additions & 1 deletion src/lib/caller/LibContext.sol
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ library LibContext {
// a single encoded output.
!SignatureChecker.isValidSignatureNow(
signedContexts[i].signer,
MessageHashUtils.toEthSignedMessageHash(LibHashNoAlloc.hashWords(signedContexts[i].context)),
MessageHashUtils.toEthSignedMessageHash(
LibHashNoAlloc.hashWords(signedContexts[i].context)
),
signedContexts[i].signature
)
) {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/deprecated/caller/LibEncodedDispatch.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ library LibEncodedDispatch {
// values to uint16.
return EncodedDispatch.wrap(
(uint256(uint160(expression)) << 0x20) | (uint256(uint16(SourceIndexV2.unwrap(sourceIndex))) << 0x10)
// forge-lint: disable-next-line(unsafe-typecast)
| uint256(uint16(maxOutputs))
// forge-lint: disable-next-line(unsafe-typecast)
| uint256(uint16(maxOutputs))
);
}

Expand Down
4 changes: 1 addition & 3 deletions test/src/lib/bytecode/LibBytecode.checkNoOOBPointers.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ contract LibBytecodeCheckNoOOBPointersTest is BytecodeTest {

/// If the relative offsets are truncated the bytecode fails as
/// `TruncatedHeaderOffsets`.
function testCheckNoOOBPointersOffsetsTruncated(bytes memory bytecode, uint8 sourceCount, uint256 length)
external
{
function testCheckNoOOBPointersOffsetsTruncated(bytes memory bytecode, uint8 sourceCount, uint256 length) external {
vm.assume(sourceCount > 0);
vm.assume(bytecode.length > 0);
bytecode[0] = bytes1(sourceCount);
Expand Down
6 changes: 1 addition & 5 deletions test/src/lib/bytecode/LibBytecode.sourcePointer.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ import {LibBytecodeSlow} from "test/src/lib/bytecode/LibBytecodeSlow.sol";
import {Pointer} from "rain.solmem/lib/LibPointer.sol";

contract LibBytecodeSourcePointerTest is BytecodeTest {
function sourcePointerExternal(bytes memory bytecode, uint256 sourceIndex)
external
pure
returns (Pointer pointer)
{
function sourcePointerExternal(bytes memory bytecode, uint256 sourceIndex) external pure returns (Pointer pointer) {
return LibBytecode.sourcePointer(bytecode, sourceIndex);
}

Expand Down
5 changes: 2 additions & 3 deletions test/src/lib/bytecode/LibBytecodeSlow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ library LibBytecodeSlow {
}

function sourcePointerSlow(bytes memory bytecode, uint256 sourceIndex) internal pure returns (Pointer) {
return bytecode.dataPointer().unsafeAddBytes(
sourceRelativeOffsetSlow(bytecode, sourceIndex) + 1 + sourceCountSlow(bytecode) * 2
);
return bytecode.dataPointer()
.unsafeAddBytes(sourceRelativeOffsetSlow(bytecode, sourceIndex) + 1 + sourceCountSlow(bytecode) * 2);
}

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