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
110 changes: 55 additions & 55 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
LibBloomTest:testLibBloomNoFalseNegatives(bytes32[],uint256,uint256) (runs: 2048, μ: 41386, ~: 36424)
LibBloomTest:testLibBloomVaguelyAvoidsFalsePositives(uint256,uint8) (runs: 2048, μ: 1770527, ~: 23096)
LibBloomTest:testLibBloomNoFalseNegatives(bytes32[],uint256,uint256) (runs: 1976, μ: 40655, ~: 35438)
LibBloomTest:testLibBloomVaguelyAvoidsFalsePositives(uint256,uint8) (runs: 2048, μ: 1581001, ~: 22262)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers0() (gas: 427)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers1() (gas: 455)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers1Fail(bytes) (runs: 2048, μ: 6779, ~: 6596)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersConforming(bytes,uint256,bytes32) (runs: 2048, μ: 19217, ~: 16837)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOffsetPointer(bytes,uint8,bytes32,uint8) (runs: 2048, μ: 25657, ~: 23005)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOpsCount(bytes,uint8,bytes32,uint8) (runs: 2048, μ: 26086, ~: 23613)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptSourcesCount(bytes,uint8,bytes32,uint8) (runs: 2048, μ: 21143, ~: 19945)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersEndGarbage(bytes,bytes) (runs: 2048, μ: 18246, ~: 16949)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersHeaderTruncated(bytes,uint8,bytes32,uint256) (runs: 2048, μ: 28173, ~: 25692)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersInputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 2048, μ: 30684, ~: 27816)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOffsetsTruncated(bytes,uint8,uint256) (runs: 2048, μ: 11312, ~: 11319)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOutputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 2048, μ: 30676, ~: 27849)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersSourceTruncated(bytes,uint8,bytes32,uint8) (runs: 2048, μ: 26741, ~: 24363)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersTrailingOffsetBytes(bytes,bytes,uint8,bytes32) (runs: 2048, μ: 31095, ~: 27697)
LibBytecodeSourceCountTest:testSourceCount0() (gas: 3189)
LibBytecodeSourceCountTest:testSourceCount1(bytes) (runs: 2048, μ: 3953, ~: 3950)
LibBytecodeSourceCountTest:testSourceCountReference(bytes) (runs: 2048, μ: 3673, ~: 3670)
LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 27912, ~: 24664)
LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 25218, ~: 23134)
LibBytecodeSourceOpsCountTest:testSourceOpsCount() (gas: 6042)
LibBytecodeSourceOpsCountTest:testSourceOpsCountAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 27256, ~: 24159)
LibBytecodeSourceOpsCountTest:testSourceOpsCountIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 24959, ~: 22648)
LibBytecodeSourcePointerTest:testSourcePointerAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 27199, ~: 24013)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers1Fail(bytes) (runs: 2022, μ: 6776, ~: 6596)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersConforming(bytes,uint256,bytes32) (runs: 2048, μ: 18887, ~: 16837)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOffsetPointer(bytes,uint8,bytes32,uint8) (runs: 1339, μ: 25442, ~: 22955)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOpsCount(bytes,uint8,bytes32,uint8) (runs: 1399, μ: 25991, ~: 23574)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptSourcesCount(bytes,uint8,bytes32,uint8) (runs: 1871, μ: 21201, ~: 19864)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersEndGarbage(bytes,bytes) (runs: 2023, μ: 18234, ~: 16943)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersHeaderTruncated(bytes,uint8,bytes32,uint256) (runs: 1464, μ: 27962, ~: 25534)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersInputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 1481, μ: 30614, ~: 27673)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOffsetsTruncated(bytes,uint8,uint256) (runs: 1756, μ: 11314, ~: 11319)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOutputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 1481, μ: 30611, ~: 27640)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersSourceTruncated(bytes,uint8,bytes32,uint8) (runs: 1399, μ: 26658, ~: 24197)
LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersTrailingOffsetBytes(bytes,bytes,uint8,bytes32) (runs: 1473, μ: 31407, ~: 27697)
LibBytecodeSourceCountTest:testSourceCount0() (gas: 349)
LibBytecodeSourceCountTest:testSourceCount1(bytes) (runs: 2037, μ: 3619, ~: 3616)
LibBytecodeSourceCountTest:testSourceCountReference(bytes) (runs: 2048, μ: 836, ~: 833)
LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1657, μ: 27607, ~: 23995)
LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 25469, ~: 22729)
LibBytecodeSourceOpsCountTest:testSourceOpsCount() (gas: 2212)
LibBytecodeSourceOpsCountTest:testSourceOpsCountAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1641, μ: 27558, ~: 23821)
LibBytecodeSourceOpsCountTest:testSourceOpsCountIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 25366, ~: 22648)
LibBytecodeSourcePointerTest:testSourcePointerAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1634, μ: 27269, ~: 23675)
LibBytecodeSourcePointerTest:testSourcePointerEmpty0(uint256) (runs: 2048, μ: 5775, ~: 5775)
LibBytecodeSourcePointerTest:testSourcePointerEmpty1(uint256) (runs: 2048, μ: 6158, ~: 6158)
LibBytecodeSourcePointerTest:testSourcePointerIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 25128, ~: 23076)
LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetHappy() (gas: 5070)
LibBytecodeSourcePointerTest:testSourcePointerIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 25195, ~: 22360)
LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetHappy() (gas: 1237)
LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetIndexError() (gas: 95395)
LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetReference(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 26668, ~: 23453)
LibBytecodeSourceStackAllocationTest:testSourceStackAllocationAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 27399, ~: 24210)
LibBytecodeSourceStackAllocationTest:testSourceStackAllocationIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 24928, ~: 22645)
LibContextHashTest:testFuzzHash0() (gas: 3530)
LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetReference(bytes,uint256,uint256,bytes32) (runs: 1639, μ: 26790, ~: 23115)
LibBytecodeSourceStackAllocationTest:testSourceStackAllocationAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1625, μ: 27554, ~: 23875)
LibBytecodeSourceStackAllocationTest:testSourceStackAllocationIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 25197, ~: 22550)
LibContextHashTest:testFuzzHash0() (gas: 3552)
LibContextHashTest:testHash(uint256) (runs: 2048, μ: 282, ~: 282)
LibContextHashTest:testHashGas0() (gas: 209)
LibContextHashTest:testSignedContextArrayHashReferenceImplementation((address,uint256[],bytes)[]) (runs: 100, μ: 2545172, ~: 2291732)
LibContextHashTest:testSignedContextArrayHashReferenceImplementation0() (gas: 5088)
LibContextHashTest:testHashGas0() (gas: 208)
LibContextHashTest:testSignedContextArrayHashReferenceImplementation((address,bytes32[],bytes)[]) (runs: 100, μ: 2616738, ~: 2348780)
LibContextHashTest:testSignedContextArrayHashReferenceImplementation0() (gas: 2190)
LibContextHashTest:testSignedContextHashEncodeGas0() (gas: 1683)
LibContextHashTest:testSignedContextHashGas0() (gas: 827)
LibContextHashTest:testSignedContextHashReferenceImplementation((address,uint256[],bytes)) (runs: 100, μ: 15354, ~: 14891)
LibContextTest:testBase() (gas: 4431)
LibContextTest:testBuild0() (gas: 5359)
LibContextTest:testBuildGas0() (gas: 896)
LibContextTest:testBuildStructureReferenceImplementation(uint256[][]) (runs: 100, μ: 4402850, ~: 4186832)
LibContextHashTest:testSignedContextHashReferenceImplementation((address,bytes32[],bytes)) (runs: 100, μ: 13613, ~: 13205)
LibContextTest:testBase() (gas: 616)
LibContextTest:testBuild0() (gas: 5028)
LibContextTest:testBuildGas0() (gas: 962)
LibContextTest:testBuildStructureReferenceImplementation(bytes32[][]) (runs: 100, μ: 4643768, ~: 4795790)
LibDeployerDiscoverableTest:testTouchDeployerV4Mock() (gas: 184831)
LibEncodedDispatchTest:testRoundTrip(address,uint256,uint16) (runs: 2048, μ: 8034, ~: 8311)
LibEvaluableTest:testEvaluableV2HashDifferent((address,address,address),(address,address,address)) (runs: 2048, μ: 4560, ~: 4560)
LibEncodedDispatchTest:testRoundTrip(address,uint256,uint16) (runs: 2048, μ: 4498, ~: 4781)
LibEvaluableTest:testEvaluableV2HashDifferent((address,address,address),(address,address,address)) (runs: 2048, μ: 4238, ~: 4238)
LibEvaluableTest:testEvaluableV2HashGas0() (gas: 297)
LibEvaluableTest:testEvaluableV2HashGasSlow0() (gas: 583)
LibEvaluableTest:testEvaluableV2HashSame((address,address,address)) (runs: 2048, μ: 3846, ~: 3846)
LibEvaluableTest:testEvaluableV2HashSensitivity((address,address,address),(address,address,address)) (runs: 2048, μ: 7958, ~: 7958)
LibEvaluableTest:testEvaluableV2KnownHash() (gas: 3194)
LibEvaluableTest:testEvaluableV2ReferenceImplementation((address,address,address)) (runs: 2048, μ: 3910, ~: 3910)
LibEvaluableTest:testEvaluableV3BytecodeLengthSensitivity() (gas: 3729)
LibEvaluableTest:testEvaluableV3HashDifferent((address,address,bytes),(address,address,bytes)) (runs: 2048, μ: 5517, ~: 5514)
LibEvaluableTest:testEvaluableV2HashSame((address,address,address)) (runs: 2048, μ: 1006, ~: 1006)
LibEvaluableTest:testEvaluableV2HashSensitivity((address,address,address),(address,address,address)) (runs: 2045, μ: 6002, ~: 6002)
LibEvaluableTest:testEvaluableV2KnownHash() (gas: 354)
LibEvaluableTest:testEvaluableV2ReferenceImplementation((address,address,address)) (runs: 2048, μ: 1070, ~: 1070)
LibEvaluableTest:testEvaluableV3BytecodeLengthSensitivity() (gas: 901)
LibEvaluableTest:testEvaluableV3HashDifferent((address,address,bytes),(address,address,bytes)) (runs: 2048, μ: 5194, ~: 5192)
LibEvaluableTest:testEvaluableV3HashGas0() (gas: 431)
LibEvaluableTest:testEvaluableV3HashGasSlow0() (gas: 764)
LibEvaluableTest:testEvaluableV3HashSame((address,address,bytes)) (runs: 2048, μ: 4445, ~: 4434)
LibEvaluableTest:testEvaluableV3HashSensitivity((address,address,bytes),(address,address,bytes)) (runs: 2048, μ: 10298, ~: 10268)
LibEvaluableTest:testEvaluableV3KnownHash() (gas: 3444)
LibEvaluableTest:testEvaluableV3ReferenceImplementation((address,address,bytes)) (runs: 2048, μ: 4551, ~: 4540)
LibGenParseMetaBuildMetaTest:testBuildMeta((bytes32,string)[]) (runs: 2048, μ: 3511253, ~: 1823519)
LibGenParseMetaBuildMetaTest:testRoundMetaExpanderDeeper((bytes32,string)[],uint8,bytes32) (runs: 2048, μ: 6731595, ~: 6433817)
LibGenParseMetaBuildMetaTest:testRoundMetaExpanderShallow((bytes32,string)[],uint8,bytes32) (runs: 2048, μ: 3608563, ~: 3039373)
LibGenParseMetaFindExpanderTest:testFindExpanderSmall((bytes32,string)[]) (runs: 2048, μ: 43196, ~: 34218)
LibEvaluableTest:testEvaluableV3HashSame((address,address,bytes)) (runs: 2048, μ: 1605, ~: 1594)
LibEvaluableTest:testEvaluableV3HashSensitivity((address,address,bytes),(address,address,bytes)) (runs: 2047, μ: 8339, ~: 8312)
LibEvaluableTest:testEvaluableV3KnownHash() (gas: 604)
LibEvaluableTest:testEvaluableV3ReferenceImplementation((address,address,bytes)) (runs: 2048, μ: 1711, ~: 1700)
Comment on lines +48 to +62
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Evaluable hashes — add V4 coverage if public struct was added

V2/V3 hash tests look steady. If a public EvaluableV4 type was introduced in this PR, please add analogous V4 hash/known‑hash/reference tests so it appears in the snapshot too.


🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -nP '\bEvaluableV4\b' -n -C2 || true
rg -nP 'testEvaluableV4' -n || true

Length of output: 477


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Find test file containing LibEvaluableTest
fd -type f -name '*Evaluable*' | grep -i test || echo "No files with 'Evaluable' and 'test' found"
# Search for testEvaluable in Solidity files
rg -l 'testEvaluable' --type solidity || echo "No Solidity files with 'testEvaluable' found"

Length of output: 291


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Find all .sol files with "test" in the name or path
fd -e sol -path '*/test*' | head -20
# Search for files with testEvaluable pattern
rg -l 'testEvaluable' --glob '*.sol' || echo "No matches found"
# Search for LibEvaluableTest
rg -l 'LibEvaluableTest' --glob '*.sol' || echo "No LibEvaluableTest found"

Length of output: 168


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Find test files containing "Evaluable" or "testEvaluable"
find . -type f -name "*.sol" | xargs grep -l "testEvaluableV4" 2>/dev/null || echo "No testEvaluableV4 found"
find . -type f -name "*.sol" | xargs grep -l "LibEvaluableTest" 2>/dev/null || echo "No LibEvaluableTest found"
# Search for any test file in test directory
find ./test -type f -name "*.sol" 2>/dev/null | head -10 || echo "No test files found"

Length of output: 561


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Check LibEvaluable.t.sol for V2, V3, and V4 test patterns
echo "=== Checking for test patterns ==="
rg -n "testEvaluableV2|testEvaluableV3|testEvaluableV4" ./test/src/lib/caller/LibEvaluable.t.sol | head -20 || echo "No matches"
echo ""
echo "=== Full test file preview ==="
wc -l ./test/src/lib/caller/LibEvaluable.t.sol
echo ""
echo "=== Checking for EvaluableV4 references in test file ==="
grep -n "EvaluableV4\|V4" ./test/src/lib/caller/LibEvaluable.t.sol || echo "No V4 references found"

Length of output: 1387


Add V4 hash test coverage to match V2/V3 pattern

EvaluableV4 struct has been introduced in src/interface/unstable/IInterpreterCallerV4.sol, but no corresponding tests exist in test/src/lib/caller/LibEvaluable.t.sol. Add the following V4 tests to provide coverage equivalent to V2/V3:

  • testEvaluableV4KnownHash
  • testEvaluableV4HashDifferent
  • testEvaluableV4HashSame
  • testEvaluableV4HashSensitivity
  • testEvaluableV4HashGas0
  • testEvaluableV4HashGasSlow0
  • testEvaluableV4ReferenceImplementation

This will ensure V4 appears in the snapshot alongside V2/V3.

🤖 Prompt for AI Agents
In .gas-snapshot around lines 48 to 62, the snapshot shows V2/V3 test coverage
but V4 tests are missing; add V4 equivalents to
test/src/lib/caller/LibEvaluable.t.sol using the same patterns as the V2/V3
tests: implement and register testEvaluableV4KnownHash,
testEvaluableV4HashDifferent, testEvaluableV4HashSame,
testEvaluableV4HashSensitivity, testEvaluableV4HashGas0,
testEvaluableV4HashGasSlow0, and testEvaluableV4ReferenceImplementation
following the structure, inputs, and assertions used by the V2/V3 test
implementations so V4 results are produced and included in the snapshot.

LibGenParseMetaBuildMetaTest:testBuildMeta((bytes32,string)[]) (runs: 746, μ: 3740032, ~: 2814714)
LibGenParseMetaBuildMetaTest:testRoundMetaExpanderDeeper((bytes32,string)[],uint8,bytes32) (runs: 364, μ: 6840949, ~: 6501238)
LibGenParseMetaBuildMetaTest:testRoundMetaExpanderShallow((bytes32,string)[],uint8,bytes32) (runs: 717, μ: 3598305, ~: 2882702)
LibGenParseMetaFindExpanderTest:testFindExpanderSmall((bytes32,string)[]) (runs: 254, μ: 43912, ~: 33558)
LibNamespaceTest:testQualifyNamespaceGas0(uint256,address) (runs: 2048, μ: 362, ~: 362)
LibNamespaceTest:testQualifyNamespaceGasSlow0(uint256,address) (runs: 2048, μ: 569, ~: 569)
LibNamespaceTest:testQualifyNamespaceReferenceImplementation(uint256,address) (runs: 2048, μ: 3566, ~: 3566)
LitParseMetaTest:testWordBitmapped(uint256,bytes32) (runs: 2048, μ: 4740, ~: 4740)
LibNamespaceTest:testQualifyNamespaceReferenceImplementation(uint256,address) (runs: 2048, μ: 726, ~: 726)
LitParseMetaTest:testWordBitmapped(uint256,bytes32) (runs: 2048, μ: 969, ~: 969)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Possible test name typo: LitParseMetaTest

Is “LitParseMetaTest” intended, or should it be “LibParseMetaTest”? If unintentional, fix to avoid confusion and search misses.


🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -nP '\bLitParseMetaTest\b|\bLibParseMetaTest\b' -n || true

Length of output: 89


I'll verify whether this is truly a typo by checking the library being tested and the naming convention used in the codebase.The web search is general and doesn't tell me about the specific library. Let me search more specifically for this codebase to understand the actual library naming.



Let me also check the test file structure to understand the naming convention better:


---

🏁 Script executed:

```shell
#!/bin/bash
set -euo pipefail

# Look for the library definition (not the test)
# Search in src directories, not test directories
fd -e sol -path '*/src/*' -exec grep -l 'library LibParseMeta\|library LitParseMeta' {} \; || true

Length of output: 168


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check the actual test file content to see what library is imported
cat test/src/lib/parse/LibParseMeta.wordBitmapped.t.sol | head -20

Length of output: 945


Let me verify this is consistent with naming conventions used elsewhere in the test suite:Now let me check other test files in the codebase to confirm the naming pattern:


---

🏁 Script executed:

```shell
#!/bin/bash
set -euo pipefail

# Find test files and check their contract naming pattern
fd -e 't.sol' -path '*/test/*' | head -10 | xargs -I {} sh -c 'echo "=== {} ===" && grep "^contract.*Test" {} | head -1'

Length of output: 168



---

🏁 Script executed:

```shell
#!/bin/bash
set -euo pipefail

# Search for test contract declarations to see naming patterns
rg -nP '^\s*contract\s+\w+Test\s+is\s+Test' --type sol -A1 -B1 | head -50

Length of output: 27



---

🏁 Script executed:

```shell
#!/bin/bash
set -euo pipefail

# Simple search for test contract declarations
rg 'contract \w+Test is Test' test/ | head -20

Length of output: 1019


Fix test contract name: LitParseMetaTest → LibParseMetaTest

The test contract name is a typo. All test contracts in the codebase follow the pattern Lib*Test matching their library names. The library is LibParseMeta, so the test contract should be LibParseMetaTest, not LitParseMetaTest.

Rename the contract at line 9 of test/src/lib/parse/LibParseMeta.wordBitmapped.t.sol from LitParseMetaTest to LibParseMetaTest.

🤖 Prompt for AI Agents
In test/src/lib/parse/LibParseMeta.wordBitmapped.t.sol around line 9, the test
contract name is misspelled as "LitParseMetaTest" but should match the library
name pattern and be "LibParseMetaTest"; update the contract declaration to
rename "LitParseMetaTest" to "LibParseMetaTest" and ensure any references within
the file (constructor, instantiations, or test registrations) are updated to the
new name to avoid compile/test failures.

6 changes: 3 additions & 3 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": "17a9b2398a7d629931dc66a168a098d051d53dc6"
"rev": "b8f065fda83b8cd94a6b2fec8fcd911dc3b444fd"
},
"lib/openzeppelin-contracts": {
"rev": "dc44c9f1a4c3b10af99492eed84f83ed244203f6"
},
"lib/rain.intorastring": {
"rev": "e93a36d3f3814850a91eff75d7129dfcbaaf0cd5"
"rev": "82bc048226050a0e33c01c9f4282f3349a27e491"
},
"lib/rain.lib.hash": {
"rev": "d130af03ed5215b314499578486708095d08a918"
"rev": "97609eecc66fe2e30f37e48834eed4a71304af32"
},
"lib/rain.lib.typecast": {
"rev": "9c533a0a0080d2edca6033c4a9b924afc635e41b"
"rev": "6bf6e0e63bfbff37d9057332ff042a8158397681"
},
"lib/rain.math.binary": {
"rev": "d4fea34509c8b2ed5411aff28233e4c52549b62d"
"rev": "54450d62a89be456d07db1b9508f3b8a24dbb5f8"
},
"lib/rain.math.float": {
"rev": "78e15cb91b5c12ccacda8c8772a28eeb21f5b7d3"
"rev": "35b7b3980cdeab2f245dad17ee84658c1065648d"
},
"lib/rain.sol.codegen": {
"rev": "769792d577a7ecae954a7cdd64a222b8d6fe450d"
"rev": "00734d24d91db3fc4aac87c0a3c885de28449f96"
},
"lib/rain.solmem": {
"rev": "0b2e688e2f3ea84891fd43012fbdc696ac220218"
"rev": "c1c22cf27963a9de0889ebf7f52869050f1fdfb9"
}
}
2 changes: 1 addition & 1 deletion lib/forge-std
2 changes: 1 addition & 1 deletion lib/rain.lib.hash
2 changes: 1 addition & 1 deletion lib/rain.lib.typecast
2 changes: 1 addition & 1 deletion lib/rain.math.binary
2 changes: 1 addition & 1 deletion lib/rain.sol.codegen
2 changes: 1 addition & 1 deletion lib/rain.solmem
Submodule rain.solmem updated 4 files
+113 −113 .gas-snapshot
+3 −3 flake.lock
+1 −1 foundry.lock
+1 −1 lib/forge-std
8 changes: 7 additions & 1 deletion src/interface/IInterpreterCallerV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.18;

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {IParserV2} from "./IParserV2.sol";
import {IInterpreterStoreV2} from "./IInterpreterStoreV2.sol";
import {IInterpreterV3} from "./IInterpreterV3.sol";
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
/// work with than raw addresses.
Expand Down
2 changes: 2 additions & 0 deletions src/interface/IInterpreterExternV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.18;

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {EncodedExternDispatch, ExternDispatch} from "./deprecated/IInterpreterExternV2.sol";
Comment on lines +5 to 7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

Verify: ExternDispatch is actively used in this interface.

The imported type ExternDispatch is used in function parameters (lines 30, 40), so it's not an unused import. The unused-import lint suppression may only be necessary for EncodedExternDispatch. Verify the lint directive is correctly scoped.


🏁 Script executed:

#!/bin/bash
# Verify usage of imported types in IInterpreterExternV3.sol
rg -n "EncodedExternDispatch|ExternDispatch" src/interface/IInterpreterExternV3.sol

Length of output: 275



---

🏁 Script executed:

```shell
#!/bin/bash
# Check if EncodedExternDispatch is used anywhere beyond the import statement
rg -n "EncodedExternDispatch" src/interface/IInterpreterExternV3.sol | grep -v "^7:"

Length of output: 78



---

🏁 Script executed:

```shell
#!/bin/bash
# Locate the IInterpreterExternV3.sol file
fd -name "IInterpreterExternV3.sol"

Length of output: 230



---

🌐 Web query:

```web
forge-lint disable-next-line scoping per-import syntax solidity

💡 Result:

Use Foundry's inline lint directive format. Place a triple-slash doc comment before the import (or at the line) with the disable-next-line directive and the lint id in parentheses.

Example disabling the "scoping" lint for a single import line:

/// forge-lint: disable-next-line(scoping)
import { Foo } from "lib/Some.sol";

You can also disable for the current line with disable-line or for the next code item with disable-next-item. See Foundry's forge-lint inline directive docs for details. [1][2]

Sources:
[1] Foundry linter inline config reference.
[2] forge-lint documentation / examples.


Confirm the actual usage of imported types; consider removing unused EncodedExternDispatch or clarifying its export purpose.

ExternDispatch is actively used in function parameters (lines 30, 40), but EncodedExternDispatch appears only in the import statement and is never referenced in the file. The unused-import lint suppression correctly applies to the entire import line. However, if EncodedExternDispatch is not used elsewhere in the codebase and is only kept "for convenience," consider either removing it from the import or adding a clarifying comment explaining why it needs to be exported.

🤖 Prompt for AI Agents
In src/interface/IInterpreterExternV3.sol around lines 5 to 7, the import brings
in EncodedExternDispatch which is not referenced in this file; either remove
EncodedExternDispatch from the import list to avoid an unused import or, if it
must be re-exported for external convenience, add a short clarifying comment
explaining why it is exported and then keep the lint suppression (or move the
suppression to specifically target EncodedExternDispatch if supported). Update
the import line accordingly and run the linter to ensure no unused-import
warnings remain.


/// @title IInterpreterExternV3
Expand Down
2 changes: 2 additions & 0 deletions src/interface/IInterpreterStoreV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.18;

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

/// @title IInterpreterStoreV2
Expand Down
16 changes: 16 additions & 0 deletions src/interface/IInterpreterV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,30 @@ 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
Comment on lines +8 to 32
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider consolidating lint suppression directives.

You have 8 individual disable-next-line directives. Consider using disable-start and disable-end (as done in IInterpreterCallerV4.sol) to reduce verbosity when suppressing multiple consecutive imports.

Example:

//forge-lint: disable-start(unused-import)
import {
    // ... all imports ...
} from "./deprecated/IInterpreterV2.sol";
//forge-lint: disable-end
🤖 Prompt for AI Agents
In src/interface/IInterpreterV3.sol around lines 8 to 32, multiple consecutive
//forge-lint: disable-next-line(unused-import) directives are used for each
import; replace these with a single //forge-lint: disable-start(unused-import)
before the import block and a matching //forge-lint: disable-end after the block
to suppress the lint across all imports, keeping the import list intact and
removing the per-line disable comments.

} from "./deprecated/IInterpreterV2.sol";

Expand Down
1 change: 1 addition & 0 deletions src/interface/IParserV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
pragma solidity ^0.8.18;

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

interface IParserV2 {
Expand Down
5 changes: 5 additions & 0 deletions src/interface/ISubParserV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
pragma solidity ^0.8.18;

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider comment consistency across files.

The comment wording varies between "Reexports for implementations to use." (line 5) and "Exported for convenience." (lines 8, 11). Consider standardizing to one phrase across all files in this PR for consistency.

🤖 Prompt for AI Agents
In src/interface/ISubParserV3.sol around lines 6 to 13, the inline comment
phrases are inconsistent ("Reexports for implementations to use." vs "Exported
for convenience."); pick a canonical phrase (e.g., "Reexports for
implementations to use.") and update the three comment lines in this file to
that exact wording, then apply the same replacement across other files in this
PR so all reexport comments match exactly; keep the existing forge-lint
directives and spacing unchanged.


/// @dev A compatibility version for the subparser interface.
Expand Down
2 changes: 2 additions & 0 deletions src/interface/deprecated/IDebugExpressionDeployerV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
pragma solidity ^0.8.18;

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

interface IDebugExpressionDeployerV1 {
Expand Down
2 changes: 2 additions & 0 deletions src/interface/deprecated/IDebugInterpreterV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
pragma solidity ^0.8.18;

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

interface IDebugInterpreterV1 {
Expand Down
2 changes: 2 additions & 0 deletions src/interface/deprecated/IDebugInterpreterV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
pragma solidity ^0.8.18;

import {IInterpreterStoreV1, FullyQualifiedNamespace} from "./IInterpreterStoreV1.sol";
// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {IInterpreterV1, SourceIndex} from "./IInterpreterV1.sol";
Comment on lines +6 to 8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Clarify which import is exported for convenience versus actively used.

The comment and lint suppression suggest the entire import is unused and exported for convenience, but SourceIndex is actually used on line 33. Only IInterpreterV1 appears to be unused and exported for convenience.

Consider splitting into two import statements for clarity:

-// Exported for convenience.
-//forge-lint: disable-next-line(unused-import)
-import {IInterpreterV1, SourceIndex} from "./IInterpreterV1.sol";
+import {SourceIndex} from "./IInterpreterV1.sol";
+// Exported for convenience.
+//forge-lint: disable-next-line(unused-import)
+import {IInterpreterV1} from "./IInterpreterV1.sol";

Alternatively, update the comment to clarify: // IInterpreterV1 exported for convenience; SourceIndex used below.

Since this is in a deprecated directory, the current approach is acceptable if consumers genuinely benefit from the IInterpreterV1 re-export.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {IInterpreterV1, SourceIndex} from "./IInterpreterV1.sol";
import {SourceIndex} from "./IInterpreterV1.sol";
// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {IInterpreterV1} from "./IInterpreterV1.sol";
🤖 Prompt for AI Agents
In src/interface/deprecated/IDebugInterpreterV2.sol around lines 6 to 8, the
single import line and comment ambiguously imply both symbols are
unused/exported for convenience while SourceIndex is actually used later; split
into two import statements so SourceIndex is imported (no lint suppression) and
IInterpreterV1 is explicitly re-exported for convenience with a clarifying
comment, or alternatively update the existing comment to: "IInterpreterV1
exported for convenience; SourceIndex used below." Ensure the forge-lint disable
is only applied to the IInterpreterV1 import if you keep separate imports.


interface IDebugInterpreterV2 {
Expand Down
2 changes: 2 additions & 0 deletions src/interface/deprecated/IInterpreterExternV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
pragma solidity ^0.8.18;

// Exported for convenience.
//forge-lint: disable-next-line(unused-import)
import {EncodedExternDispatch, ExternDispatch} from "./IInterpreterExternV1.sol";
Comment on lines +5 to 7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify: ExternDispatch is actively used in this interface.

The imported type ExternDispatch is used in the function parameter at line 25, making it a used import. The lint suppression may only be necessary for EncodedExternDispatch if it's intended solely for re-export. Verify the directive scope.


🏁 Script executed:

#!/bin/bash
# Verify usage of imported types in IInterpreterExternV2.sol
rg -n "EncodedExternDispatch|ExternDispatch" src/interface/deprecated/IInterpreterExternV2.sol

Length of output: 158


ExternDispatch is actively used; lint suppression scope is overly broad.

The grep results confirm that ExternDispatch is actively used in the function parameter at line 25, so the disable-next-line(unused-import) directive should not suppress warnings for it. Only EncodedExternDispatch appears unused and likely intended for re-export. The lint suppression applies to the entire import statement at line 7, suppressing warnings for both types when it should only apply to EncodedExternDispatch. Either split the import into two lines with targeted suppression on the unused one, or add a more specific comment clarifying the re-export intent.

🤖 Prompt for AI Agents
In src/interface/deprecated/IInterpreterExternV2.sol around lines 5 to 7, the
lint suppression comment disables unused-import for the entire import line which
hides that ExternDispatch is actually used; split the import into two statements
so you can apply the disable-next-line(unused-import) only to the
EncodedExternDispatch import (or alternatively add a comment clarifying a
re-export) and keep a normal import for ExternDispatch so the linter correctly
recognizes its usage.


/// @title IInterpreterExternV2
Expand Down
Loading