-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sanbir/master
claimed
- Loading branch information
Showing
1 changed file
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
|
@@ -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; | ||
|
@@ -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); | ||
} | ||
|
||
|