You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complete migration from Gelato VRF to Chainlink VRF v2.5
- Replace all Gelato VRF dependencies with Chainlink VRF v2.5
- Update contracts to use VRFConsumerBaseV2Plus and native payment model
- Remove Solmate dependencies in favor of Solady for gas optimization
- Update all test files to use VRFCoordinatorV2_5Mock with proper event parsing
- Fix VRF requestId extraction from RandomWordsRequested event data field
- Remove all legacy Gelato VRF testing patterns and dead code
- Update CI/CD workflows and documentation for new dependencies
- Maintain full test coverage with 288/288 tests passing
Technical changes:
- VRF subscription model with native ETH funding
- Proper requestId extraction from event logs using abi.decode
- Consistent _fulfillVRFRequest helper pattern across all tests
- Updated deployment scripts for VRF v2.5 parameters
- Complete removal of Gelato and Solmate library references
Copy file name to clipboardExpand all lines: CLAUDE.md
+8-9Lines changed: 8 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
40
40
- Implement role-based access control patterns for fine-grained permissions.
41
41
- Use pull over push payment patterns to mitigate reentrancy and denial of service attacks.
42
42
- Implement rate limiting for sensitive functions to prevent abuse.
43
-
- Use Solmate's SafeTransferLib for interacting with ERC20 tokens.
43
+
- Use Solady's SafeTransferLib for interacting with ERC20 tokens.
44
44
- Implement proper randomness using Chainlink VRF or similar oracle solutions.
45
45
- Use assembly for gas-intensive operations, but document extensively and use with caution.
46
46
- If Solady has an implementation built already, use that instead of writing assembly from scratch.
@@ -80,7 +80,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
80
80
81
81
## Project Overview
82
82
83
-
Heavy Helms is a Solidity-based on-chain game featuring combat mechanics, NFT skins, and multiple game modes. The project uses Foundry for development and testing. Gauntlet tournaments use blockhash-based randomness for security and gas efficiency, while other modes may use Gelato VRF.
83
+
Heavy Helms is a Solidity-based on-chain game featuring combat mechanics, NFT skins, and multiple game modes. The project uses Foundry for development and testing. Gauntlet tournaments use blockhash-based randomness for security and gas efficiency, while other modes use Chainlink VRF.
84
84
85
85
## Key Commands
86
86
@@ -178,8 +178,8 @@ forge snapshot # Create gas snapshots for tests
178
178
179
179
1.**Randomness Systems**:
180
180
-**GauntletGame**: Uses blockhash-based commit-reveal for security and gas efficiency
181
-
-**Other Games**: Use Gelato VRF for on-chain randomness
182
-
- Mock system available for testing (`GelatoVRFAutoMock.sol`)
181
+
-**Other Games**: Use Chainlink VRF for on-chain randomness
182
+
- Mock system available for testing (Chainlink VRF v2.5 mocks)
183
183
184
184
2.**Fighter ID Ranges**:
185
185
- Default Players: 1-2000 (game owned)
@@ -392,14 +392,13 @@ All tests inherit from `TestBase.sol` which provides:
0 commit comments