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
85 changes: 38 additions & 47 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,69 +1,60 @@
LibBloomTest:testLibBloomNoFalseNegatives(bytes32[],uint256,uint256) (runs: 1970, μ: 40231, ~: 34931)
LibBloomTest:testLibBloomVaguelyAvoidsFalsePositives(uint256,uint8) (runs: 2048, μ: 1552760, ~: 23505)
LibBloomTest:testLibBloomNoFalseNegatives(bytes32[],uint256,uint256) (runs: 2048, μ: 38135, ~: 30080)
LibBloomTest:testLibBloomVaguelyAvoidsFalsePositives(uint256,uint8) (runs: 2048, μ: 1785796, ~: 13724)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers0() (gas: 421)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers1() (gas: 449)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers1Fail(bytes) (runs: 2022, μ: 5968, ~: 5949)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersConforming(bytes,uint256,bytes32) (runs: 2048, μ: 18014, ~: 15878)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOffsetPointer(bytes,uint8,bytes32,uint8) (runs: 1349, μ: 23977, ~: 21571)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOpsCount(bytes,uint8,bytes32,uint8) (runs: 1406, μ: 24561, ~: 22378)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptSourcesCount(bytes,uint8,bytes32,uint8) (runs: 1875, μ: 20024, ~: 18910)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersEndGarbage(bytes,bytes) (runs: 2023, μ: 17034, ~: 15942)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersHeaderTruncated(bytes,uint8,bytes32,uint256) (runs: 1472, μ: 25909, ~: 23510)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersInputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 1482, μ: 28400, ~: 26010)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOffsetsTruncated(bytes,uint8,uint256) (runs: 1755, μ: 10515, ~: 10554)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOutputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 1482, μ: 28390, ~: 26146)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersSourceTruncated(bytes,uint8,bytes32,uint8) (runs: 1406, μ: 24741, ~: 22550)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersTrailingOffsetBytes(bytes,bytes,uint8,bytes32) (runs: 1479, μ: 28945, ~: 25847)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers1Fail(bytes) (runs: 2048, μ: 5970, ~: 5949)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersConforming(bytes,uint256,bytes32) (runs: 2048, μ: 10604, ~: 8842)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOffsetPointer(bytes,uint8,bytes32,uint8) (runs: 2048, μ: 16757, ~: 14890)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOpsCount(bytes,uint8,bytes32,uint8) (runs: 2048, μ: 17474, ~: 15764)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptSourcesCount(bytes,uint8,bytes32,uint8) (runs: 2048, μ: 13079, ~: 12121)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersEndGarbage(bytes,bytes) (runs: 2048, μ: 12075, ~: 11058)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersHeaderTruncated(bytes,uint8,bytes32,uint256) (runs: 2048, μ: 18152, ~: 16236)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersInputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 2048, μ: 19761, ~: 17786)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOffsetsTruncated(bytes,uint8,uint256) (runs: 2048, μ: 7312, ~: 7454)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOutputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 2048, μ: 19751, ~: 17752)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersSourceTruncated(bytes,uint8,bytes32,uint8) (runs: 2048, μ: 17653, ~: 15934)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersTrailingOffsetBytes(bytes,bytes,uint8,bytes32) (runs: 2048, μ: 21400, ~: 18933)
LibBytecodeSourceCountTest:testSourceCount0() (gas: 343)
LibBytecodeSourceCountTest:testSourceCount1(bytes) (runs: 2037, μ: 3611, ~: 3608)
LibBytecodeSourceCountTest:testSourceCount1(bytes) (runs: 2048, μ: 3612, ~: 3608)
LibBytecodeSourceCountTest:testSourceCountReference(bytes) (runs: 2048, μ: 827, ~: 824)
LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1661, μ: 26341, ~: 22906)
LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 23602, ~: 21047)
LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 16973, ~: 14633)
LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 14549, ~: 12958)
LibBytecodeSourceOpsCountTest:testSourceOpsCount() (gas: 2163)
LibBytecodeSourceOpsCountTest:testSourceOpsCountAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1659, μ: 26295, ~: 22735)
LibBytecodeSourceOpsCountTest:testSourceOpsCountIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 23606, ~: 21108)
LibBytecodeSourcePointerTest:testSourcePointerAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1640, μ: 26289, ~: 22593)
LibBytecodeSourceOpsCountTest:testSourceOpsCountAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 16795, ~: 14466)
LibBytecodeSourceOpsCountTest:testSourceOpsCountIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 14448, ~: 12984)
LibBytecodeSourcePointerTest:testSourcePointerAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 16649, ~: 14320)
LibBytecodeSourcePointerTest:testSourcePointerEmpty0(uint256) (runs: 2048, μ: 5407, ~: 5407)
LibBytecodeSourcePointerTest:testSourcePointerEmpty1(uint256) (runs: 2048, μ: 5486, ~: 5486)
LibBytecodeSourcePointerTest:testSourcePointerIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 23572, ~: 21102)
LibBytecodeSourcePointerTest:testSourcePointerIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 14494, ~: 13076)
LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetHappy() (gas: 1215)
LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetIndexError() (gas: 85666)
LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetReference(bytes,uint256,uint256,bytes32) (runs: 1652, μ: 25544, ~: 22042)
LibBytecodeSourceStackAllocationTest:testSourceStackAllocationAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1630, μ: 26518, ~: 23055)
LibBytecodeSourceStackAllocationTest:testSourceStackAllocationIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 23528, ~: 21105)
LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetReference(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 16124, ~: 13660)
LibBytecodeSourceStackAllocationTest:testSourceStackAllocationAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 16835, ~: 14408)
LibBytecodeSourceStackAllocationTest:testSourceStackAllocationIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 14456, ~: 12875)
LibContextHashTest:testFuzzHash0() (gas: 3537)
LibContextHashTest:testHash(uint256) (runs: 2048, μ: 279, ~: 279)
LibContextHashTest:testHashGas0() (gas: 206)
LibContextHashTest:testSignedContextArrayHashReferenceImplementation((address,bytes32[],bytes)[]) (runs: 100, μ: 2614880, ~: 2346946)
LibContextHashTest:testSignedContextArrayHashReferenceImplementation((address,bytes32[],bytes)[]) (runs: 100, μ: 2424301, ~: 1983631)
LibContextHashTest:testSignedContextArrayHashReferenceImplementation0() (gas: 2172)
LibContextHashTest:testSignedContextHashEncodeGas0() (gas: 1441)
LibContextHashTest:testSignedContextHashGas0() (gas: 824)
LibContextHashTest:testSignedContextHashReferenceImplementation((address,bytes32[],bytes)) (runs: 100, μ: 13598, ~: 13190)
LibContextHashTest:testSignedContextHashReferenceImplementation((address,bytes32[],bytes)) (runs: 100, μ: 13641, ~: 13569)
LibContextTest:testBase() (gas: 611)
LibContextTest:testBuild0() (gas: 5010)
LibContextTest:testBuildGas0() (gas: 953)
LibContextTest:testBuildStructureReferenceImplementation(bytes32[][]) (runs: 100, μ: 4645490, ~: 4797429)
LibDeployerDiscoverableTest:testTouchDeployerV4Mock() (gas: 175612)
LibEncodedDispatchTest:testRoundTrip(address,uint256,uint16) (runs: 2048, μ: 4406, ~: 4681)
LibEvaluableTest:testEvaluableV2HashDifferent((address,address,address),(address,address,address)) (runs: 2048, μ: 4233, ~: 4233)
LibEvaluableTest:testEvaluableV2HashGas0() (gas: 295)
LibEvaluableTest:testEvaluableV2HashGasSlow0() (gas: 580)
LibEvaluableTest:testEvaluableV2HashSame((address,address,address)) (runs: 2048, μ: 1003, ~: 1003)
LibEvaluableTest:testEvaluableV2HashSensitivity((address,address,address),(address,address,address)) (runs: 2045, μ: 5990, ~: 5990)
LibEvaluableTest:testEvaluableV2KnownHash() (gas: 353)
LibEvaluableTest:testEvaluableV2ReferenceImplementation((address,address,address)) (runs: 2048, μ: 1066, ~: 1066)
LibEvaluableTest:testEvaluableV3BytecodeLengthSensitivity() (gas: 898)
LibEvaluableTest:testEvaluableV3HashDifferent((address,address,bytes),(address,address,bytes)) (runs: 2048, μ: 5185, ~: 5183)
LibEvaluableTest:testEvaluableV3HashGas0() (gas: 429)
LibEvaluableTest:testEvaluableV3HashGasSlow0() (gas: 758)
LibEvaluableTest:testEvaluableV3HashSame((address,address,bytes)) (runs: 2048, μ: 1599, ~: 1588)
LibEvaluableTest:testEvaluableV3HashSensitivity((address,address,bytes),(address,address,bytes)) (runs: 2044, μ: 8320, ~: 8293)
LibEvaluableTest:testEvaluableV3KnownHash() (gas: 602)
LibEvaluableTest:testEvaluableV3ReferenceImplementation((address,address,bytes)) (runs: 2048, μ: 1704, ~: 1693)
LibGenParseMetaBuildMetaTest:testBuildMeta((bytes32,string)[]) (runs: 745, μ: 3674384, ~: 2813977)
LibGenParseMetaBuildMetaTest:testRoundMetaExpanderDeeper((bytes32,string)[],uint8,bytes32) (runs: 366, μ: 6652382, ~: 6359523)
LibGenParseMetaBuildMetaTest:testRoundMetaExpanderShallow((bytes32,string)[],uint8,bytes32) (runs: 715, μ: 3521627, ~: 3137421)
LibGenParseMetaFindExpanderTest:testFindExpanderSmall((bytes32,string)[]) (runs: 254, μ: 41946, ~: 33181)
LibEvaluableTest:testEvaluableV4BytecodeLengthSensitivity() (gas: 897)
LibEvaluableTest:testEvaluableV4HashDifferent((address,address,bytes),(address,address,bytes)) (runs: 2048, μ: 5148, ~: 5149)
LibEvaluableTest:testEvaluableV4HashGas0() (gas: 429)
LibEvaluableTest:testEvaluableV4HashGasSlow0() (gas: 768)
LibEvaluableTest:testEvaluableV4HashSame((address,address,bytes)) (runs: 2048, μ: 1565, ~: 1554)
LibEvaluableTest:testEvaluableV4HashSensitivity((address,address,bytes),(address,address,bytes)) (runs: 2048, μ: 8278, ~: 8263)
LibEvaluableTest:testEvaluableV4KnownHash() (gas: 580)
LibEvaluableTest:testEvaluableV4ReferenceImplementation((address,address,bytes)) (runs: 2048, μ: 1693, ~: 1682)
LibGenParseMetaBuildMetaTest:testBuildMeta((bytes32,string)[]) (runs: 2048, μ: 3700890, ~: 3857085)
LibGenParseMetaBuildMetaTest:testRoundMetaExpanderDeeper((bytes32,string)[],uint8,bytes32) (runs: 2048, μ: 6807238, ~: 6710253)
LibGenParseMetaBuildMetaTest:testRoundMetaExpanderShallow((bytes32,string)[],uint8,bytes32) (runs: 2048, μ: 3776067, ~: 4027823)
LibGenParseMetaFindExpanderTest:testFindExpanderSmall((bytes32,string)[]) (runs: 2048, μ: 41282, ~: 31299)
LibNamespaceTest:testQualifyNamespaceGas0(uint256,address) (runs: 2048, μ: 359, ~: 359)
LibNamespaceTest:testQualifyNamespaceGasSlow0(uint256,address) (runs: 2048, μ: 566, ~: 566)
LibNamespaceTest:testQualifyNamespaceReferenceImplementation(uint256,address) (runs: 2048, μ: 722, ~: 722)
Expand Down
3 changes: 0 additions & 3 deletions src/error/ErrBytecode.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.25;

/// @dev Workaround for https://github.com/foundry-rs/foundry/issues/6572
contract ErrBytecode {}

/// Thrown when a bytecode source index is out of bounds.
/// @param sourceIndex The source index that was out of bounds.
/// @param bytecode The bytecode that was inspected.
Expand Down
3 changes: 0 additions & 3 deletions src/error/ErrExtern.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.25;

/// @dev Workaround for https://github.com/foundry-rs/foundry/issues/6572
contract ErrExtern {}

/// Thrown when the extern interface is not supported.
error NotAnExternContract(address extern);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.18;

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {IParserV2} from "../IParserV2.sol";
import {IParserV2} from "./IParserV2.sol";
import {IInterpreterStoreV3} from "./IInterpreterStoreV3.sol";
import {IInterpreterV4} from "./IInterpreterV4.sol";
import {
Expand All @@ -15,7 +15,7 @@ import {
SIGNED_CONTEXT_SIGNER_OFFSET,
SIGNED_CONTEXT_CONTEXT_OFFSET,
SIGNED_CONTEXT_SIGNATURE_OFFSET
} from "../IInterpreterCallerV3.sol";
} from "./deprecated/v2/IInterpreterCallerV3.sol";

//forge-lint: disable-end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.18;

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {StateNamespace, FullyQualifiedNamespace, NO_STORE} from "../IInterpreterStoreV2.sol";
import {StateNamespace, FullyQualifiedNamespace, NO_STORE} from "./deprecated/v2/IInterpreterStoreV2.sol";

/// @title IInterpreterStoreV3
/// @notice Tracks state changes on behalf of an interpreter. A single store can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_STACK
} from "../IInterpreterV3.sol";
} from "./deprecated/v2/IInterpreterV3.sol";
import {IInterpreterStoreV3} from "./IInterpreterStoreV3.sol";

type OperandV2 is bytes32;
Expand Down
2 changes: 1 addition & 1 deletion src/interface/IParserV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.18;

// Reexport AuthoringMetaV2 for downstream use.
//forge-lint: disable-next-line(unused-import)
import {AuthoringMetaV2} from "./deprecated/IParserV1.sol";
import {AuthoringMetaV2} from "./deprecated/v1/IParserV1.sol";

interface IParserV2 {
function parse2(bytes calldata data) external view returns (bytes calldata bytecode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.18;

// Reexports for implementations to use.
//forge-lint: disable-next-line(unused-import)
import {AuthoringMetaV2} from "../ISubParserV3.sol";
import {AuthoringMetaV2} from "./deprecated/v2/ISubParserV3.sol";
//forge-lint: disable-next-line(unused-import)
import {OperandV2} from "./IInterpreterV4.sol";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.18;

import {IInterpreterStoreV2} from "../IInterpreterStoreV2.sol";
import {IInterpreterStoreV2} from "../v2/IInterpreterStoreV2.sol";
import {IInterpreterV2} from "./IInterpreterV2.sol";

string constant IERC1820_NAME_IEXPRESSION_DEPLOYER_V3 = "IExpressionDeployerV3";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.18;

import {IInterpreterStoreV2} from "../IInterpreterStoreV2.sol";
import {IInterpreterStoreV2} from "../v2/IInterpreterStoreV2.sol";
import {IInterpreterV2} from "./IInterpreterV2.sol";

string constant IERC1820_NAME_IEXPRESSION_DEPLOYER_V4 = "IExpressionDeployerV4";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pragma solidity ^0.8.18;

import {IExpressionDeployerV3} from "./IExpressionDeployerV3.sol";
import {IInterpreterStoreV2} from "../IInterpreterStoreV2.sol";
import {IInterpreterStoreV2} from "../v2/IInterpreterStoreV2.sol";
import {IInterpreterV2} from "./IInterpreterV2.sol";

/// Standard struct that can be embedded in ABIs in a consistent format for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.18;
// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {EncodedDispatch, StateNamespace, Operand, DEFAULT_STATE_NAMESPACE} from "./IInterpreterV1.sol";
import {FullyQualifiedNamespace, IInterpreterStoreV2} from "../IInterpreterStoreV2.sol";
import {FullyQualifiedNamespace, IInterpreterStoreV2} from "../v2/IInterpreterStoreV2.sol";

/// @dev For maximum compatibility with external contracts, the `IInterpreterV2`
/// should implement an opcode that reads from the stack by index as opcode `0`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.18;

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {IParserV2} from "./IParserV2.sol";
import {IParserV2} from "../../IParserV2.sol";
import {IInterpreterStoreV2} from "./IInterpreterStoreV2.sol";
import {IInterpreterV3} from "./IInterpreterV3.sol";
import {
Expand All @@ -15,7 +15,7 @@ import {
SIGNED_CONTEXT_SIGNER_OFFSET,
SIGNED_CONTEXT_CONTEXT_OFFSET,
SIGNED_CONTEXT_SIGNATURE_OFFSET
} from "./deprecated/IInterpreterCallerV2.sol";
} from "../v1/IInterpreterCallerV2.sol";

//forge-lint: disable-end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.18;

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {EncodedExternDispatch, ExternDispatch} from "./deprecated/IInterpreterExternV2.sol";
import {EncodedExternDispatch, ExternDispatch} from "../v1/IInterpreterExternV2.sol";

/// @title IInterpreterExternV3
/// Handle a single dispatch from some calling contract with an array of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.18;

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {StateNamespace, FullyQualifiedNamespace, NO_STORE} from "./deprecated/IInterpreterStoreV1.sol";
import {StateNamespace, FullyQualifiedNamespace, NO_STORE} from "../v1/IInterpreterStoreV1.sol";

/// @title IInterpreterStoreV2
/// @notice Tracks state changes on behalf of an interpreter. A single store can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
OPCODE_STACK
} from "./deprecated/IInterpreterV2.sol";
} from "../v1/IInterpreterV2.sol";

interface IInterpreterV3 {
function functionPointers() external view returns (bytes calldata);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ pragma solidity ^0.8.18;

// Reexports for implementations to use.
//forge-lint: disable-next-line(unused-import)
import {AuthoringMetaV2} from "./deprecated/IParserV1.sol";
import {AuthoringMetaV2} from "../v1/IParserV1.sol";
// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {Operand} from "./deprecated/IInterpreterV2.sol";
import {Operand} from "../v1/IInterpreterV2.sol";
// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {COMPATIBILITY_V2, COMPATIBILITY_V3, COMPATIBILITY_V4} from "./deprecated/ISubParserV2.sol";
import {COMPATIBILITY_V2, COMPATIBILITY_V3, COMPATIBILITY_V4} from "../v1/ISubParserV2.sol";

/// @dev A compatibility version for the subparser interface.
///
Expand Down
11 changes: 10 additions & 1 deletion src/lib/caller/LibContext.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,24 @@ import {
SIGNED_CONTEXT_SIGNER_OFFSET,
SIGNED_CONTEXT_SIGNATURE_OFFSET,
SIGNED_CONTEXT_CONTEXT_OFFSET
} from "../../interface/IInterpreterCallerV3.sol";
} from "../../interface/IInterpreterCallerV4.sol";

/// Thrown when the ith signature from a list of signed contexts is invalid.
/// @param i The index of the invalid signature in the list of signed contexts.
error InvalidSignature(uint256 i);

/// @dev CONTEXT_BASE_COLUMN and CONTEXT_BASE_ROWS are the dimensions of the base
/// context provided by `LibContext.base()`. These constants are not required to
/// use the base context but are provided for convenience when working with it.
uint256 constant CONTEXT_BASE_COLUMN = 0;
/// @dev CONTEXT_BASE_ROWS is the number of rows in the base context, which is
/// always 2 for the `msg.sender` and address of the calling contract.
uint256 constant CONTEXT_BASE_ROWS = 2;

/// @dev The row index of the `msg.sender` in the base context.
uint256 constant CONTEXT_BASE_ROW_SENDER = 0;
/// @dev The row index of the address of the calling contract in the base
/// context.
uint256 constant CONTEXT_BASE_ROW_CALLING_CONTRACT = 1;

/// @title LibContext
Expand Down
Loading