Conversation
Replace the old multi-file ingot structure (13 .fe files) with a single bountiful.fe using the new effects-based contract model. The 6 game variants and trait system are consolidated into one Game contract due to compiler limitations (StorageMap structs can't be passed as values, tuple ABI arity cap). Key changes: - Contracts use msg/recv blocks instead of pub fn with Context - Storage uses StorageMap effects instead of inline Map fields - Cross-contract calls use Call effect instead of stub contracts - Board stored in StorageMap<u256,u256> instead of Array<u256,16> - Reverts replaced with error code returns - 8 Fe-native tests (fe test) replace the old Hardhat test suite Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…er limitations Split the single bountiful.fe into a proper Fe ingot structure: - src/lib.fe: shared error codes, constants, helpers, cross-contract msg interfaces - src/game.fe: Game contract (15-puzzle challenge) - src/registry.fe: BountyRegistry contract (bounty platform) The standalone bountiful.fe is kept for running tests (fe test only discovers #[test] in the root module, and cross-module contract refs cause an ICE). Add LIMITATIONS.md documenting 6 Fe compiler limitations for GitHub issues. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GameBitboard (bitwise u256 board), Game2D (nested 2D arrays), and GameEnum (enum/match/struct impl) — exercises distinct Fe language features. All 14 tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete the 1093-line monolith and activate the child module files in src/. Tests now live in lib.fe and import contracts from child modules via `use ingot::*`. All 14 tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Port 7 new tests from the old JS test suite: non-admin register, admin register+check, remove unlocked, remove while locked, claim without lock, claim unregistered, claim unsolved. Fix critical bug: all tests used args: (0,) as admin_inner, but ctx.caller() in Fe test EVM is the test contract's address (not Address::ZERO). Use evm.address().inner to correctly set admin. This also fixes test_full_bounty_flow which was silently a no-op. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The workaround test was needed because the Fe test runner only checked lib.fe for #[test] functions. This has been fixed upstream, so the workaround can be removed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restructure the flat single-ingot project into a workspace with
dedicated ingots for better separation of concerns:
shared — error codes, constants, cross-contract msg interfaces,
game_util helpers, DummyLockValidator test utility
registry — BountyRegistry contract, DummyGame test utility
games — Game, Game2D, GameBitboard, GameEnum contracts
Dependency graph (no cycles):
shared ← registry
shared ← games
DummyLockValidator lives in shared (not games) so both registry and
games tests can deploy it without creating a circular dependency.
DummyGame in registry replaces the real Game contract in registry tests,
eliminating the games→registry→games cycle.
All 26 tests pass (shared: 1, registry: 14, games: 11).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate e2e testing from Hardhat to Foundry to cover scenarios Fe's test runner cannot: block advancement (vm.roll), ETH value transfers, and multi-account authorization (vm.prank). 21 tests across two suites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deploys BountyRegistry + Game, registers the game as a challenge, and initializes a solvable 15-puzzle board. Configurable lock deposit via LOCK_DEPOSIT env var (default 0.01 ETH). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce a shared Error enum with to_int() for type-safe, sequential error codes (1-8) instead of scattered constants with gaps. Update all contracts and Foundry test constants. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Drop hardhat.config.js, package.json, old JS test files, and Hardhat deployment scripts. Update .gitignore for Foundry build artifacts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
IGame pretended to be universal but didn't match all game variants (game_2d has a different getBoard signature). The registry only needs isSolved(), so that's the shared interface now. Tests and deploy script define their own local IGame for variant-specific methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These APIs answer yes/no questions and should return bool instead of u256. Also changes open_challenges map to StorageMap<Address, bool>. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
No description provided.