We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d79fc7 commit 5768201Copy full SHA for 5768201
1 file changed
claim_contracts/src/ClaimableAirdrop.sol
@@ -112,6 +112,9 @@ contract ClaimableAirdrop is
112
113
require(verifies, "Invalid Merkle proof");
114
115
+ // Done before the transfer call to make sure the reentrancy bug is not possible
116
+ hasClaimed[msg.sender] = true;
117
+
118
bool success = IERC20(tokenProxy).transferFrom(
119
tokenDistributor,
120
msg.sender,
@@ -120,8 +123,6 @@ contract ClaimableAirdrop is
123
121
124
require(success, "Failed to transfer funds");
122
125
- hasClaimed[msg.sender] = true;
-
126
emit TokensClaimed(msg.sender, amount);
127
}
128
0 commit comments