File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ contract ClaimableAirdrop is
3030 /// @notice Merkle root of the claimants.
3131 bytes32 public claimMerkleRoot;
3232
33- /// @notice Mapping tracking claimed leaves per address .
34- /// @dev Key is keccak256(abi.encode(claimer, leaf)), value is true if claimed .
33+ /// @notice Mapping tracking claimed leaves.
34+ /// @dev Key is the Merkle leaf itself .
3535 mapping (bytes32 => bool ) public hasClaimed;
3636
3737 /// @notice Event emitted when a claimant claims the tokens.
@@ -163,8 +163,7 @@ contract ClaimableAirdrop is
163163 )
164164 );
165165
166- bytes32 claimKey = keccak256 (abi.encode (msg .sender , leaf));
167- require (! hasClaimed[claimKey], "Stage already claimed " );
166+ require (! hasClaimed[leaf], "Stage already claimed " );
168167
169168 bool verifies = MerkleProof.verify (
170169 merkleProof,
@@ -173,7 +172,7 @@ contract ClaimableAirdrop is
173172 );
174173 require (verifies, "Invalid Merkle proof " );
175174
176- hasClaimed[claimKey ] = true ;
175+ hasClaimed[leaf ] = true ;
177176 }
178177
179178 /// @notice Update the Merkle root.
You can’t perform that action at this time.
0 commit comments