fix: correct stale docs, wrong test commands, and inaccurate API surface#274
Closed
fix: correct stale docs, wrong test commands, and inaccurate API surface#274
Conversation
- core.mdx: update ContractState to include storageMapUint, storageMap2, knownAddresses, events fields; add full storage operation table - compiler.mdx: fix allSpecs to show List ContractSpec (not tuple with selectors); note that selectors are computed automatically - getting-started.mdx: fix incorrect claim that property tests work without FOUNDRY_PROFILE=difftest (all property tests use deployYul which calls vm.ffi) - first-contract.mdx: add FOUNDRY_PROFILE=difftest to test commands and explain why it's required - examples.mdx: update contract file layout to show Proofs/Basic.lean and Proofs/Correctness.lean; fix unbalanced paren in ReentrancyExample - test/README.md: fix incorrect claim that forge test runs property tests without FFI; add FOUNDRY_PROFILE=difftest to all relevant commands Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
Closing — all changes in this PR have been merged via later PRs:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes multiple documentation inaccuracies that would cause developers to fail when following the guides:
core.mdx:ContractStatestruct was missing 4 fields (storageMapUint,storageMap2,knownAddresses,events) and the storage operations table was incomplete (missinggetMappingUint/setMappingUint,getMapping2/setMapping2,emitEvent, and context accessors)compiler.mdx:allSpecswas shown asList (ContractSpec × List Nat)(tuple with manual selectors) but the actual code isList ContractSpec— selectors are computed automatically bycomputeSelectorsgetting-started.mdx: Incorrectly claimedforge testworks for property tests withoutFOUNDRY_PROFILE=difftest. All property tests usedeployYul()→vm.ffi()→solc, which requires FFI enabledfirst-contract.mdx: Test commands missingFOUNDRY_PROFILE=difftest, which would fail on first useexamples.mdx: File layout section was stale (missingProofs/<Name>/Basic.leanandCorrectness.lean); ReentrancyExample code had unbalanced parenthesistest/README.md: Claimedforge testruns "unit + property tests" but property tests require FFI; fixed all commands to includeFOUNDRY_PROFILE=difftestVerification
Each fix was verified against the actual codebase:
ContractStatefields checked againstVerity/Core.lean:37-48allSpecstype checked againstCompiler/Specs.lean:453Property*.t.solfiles confirmed to importYulTestBase(which usesvm.ffi)foundry.tomlconfirmsffi = falsein default profile,ffi = truein difftestTest plan
🤖 Generated with Claude Code
Note
Low Risk
Docs-only changes that correct API descriptions and required Foundry commands; no runtime or proof logic is modified.
Overview
Updates documentation to match the current codebase and prevent broken setup steps. The compiler docs now show
allSpecs : List ContractSpecand clarify that function selectors are computed automatically during compilation.Core docs are corrected to include the full
ContractStatesurface (additional mapping types, address tracking, and event log) and to document the missing storage/event operations. Guides and test docs are updated to consistently run Foundry withFOUNDRY_PROFILE=difftest(and explain thevm.ffi()requirement), andexamples.mdxis refreshed for the new proofs layout plus a small syntax fix in the ReentrancyExample snippet.Written by Cursor Bugbot for commit c66405b. This will update automatically on new commits. Configure here.