Skip to content

Commit

Permalink
Merge pull request #1 from sanbir/master
Browse files Browse the repository at this point in the history
claimed
  • Loading branch information
sanbir authored Oct 10, 2024
2 parents 81a5184 + 0bd266c commit dd05a84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/MerkleAirdrop.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]>
// SPDX-License-Identifier: MIT

pragma solidity 0.8.27;

import "./@openzeppelin/access/Ownable2Step.sol";
Expand All @@ -13,6 +16,7 @@ contract MerkleAirdrop is Ownable2Step {

event MerkleAirdrop__MerkleRootSet(bytes32 _merkleRoot);
event MerkleAirdrop__EtherRecovered(address _recipient, uint256 _amount);
event MerkleAirdrop__Claimed(address indexed _recipient, uint256 _amount);

constructor(bytes32 _merkleRoot) payable {
merkleRoot = _merkleRoot;
Expand All @@ -38,6 +42,7 @@ contract MerkleAirdrop is Ownable2Step {

// Mark address as claimed and transfer the ETH
claimed[msg.sender] = true;
emit MerkleAirdrop__Claimed(msg.sender, _amount);
Address.sendValue(payable(msg.sender), _amount);
}

Expand Down

0 comments on commit dd05a84

Please sign in to comment.