.### Description
The contract utilizes an inconsistent hashing approach between the off-chain JavaScript/TypeScript Merkle tree generation and the on-chain Solidity validation logic. The current implementation lacks standard formatting compatibility, causing proof verification workflows to consistently fail or revert. This results in users being completely unable to claim their intended airdrop or distribution.
### Proof of Concept
The following automated Foundry test demonstrates that a production-ready claim using a valid off-chain leaf structure will always fail on-chain because the internal verification sequence reverts.
```solidity
function test_ProductionClaimAlwaysReverts() public {
bytes32[] memory emptyProof = new bytes32[](0);
vm.deal(alice, 1 ether);
vm.startPrank(alice);
vm.expectRevert();
airdrop.claim{value: 1e9}(alice, 25 * 1e6, emptyProof);
vm.stopPrank();
emit log("Confirmed: production claim always reverts");
}
```
### Recommended Mitigation
Align the Solidity leaf-hashing algorithm to mirror standard JavaScript Merkle tools (such as OpenZeppelin's MerkleTree.js library). Adopt a standardized double-hash or explicit type-packed encoding scheme to ensure broad multi-platform compatibility, using Uniswap's MerkleDistributor standard as an architectural reference.
```diff
-
- bytes32 leaf = keccak256(abi.encode(account, amount));
- Fix reference: Uniswap MerkleDistributor single-hash encoding
+ bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encodePacked(account, amount))));
```