Skip to content

Commit 35c85e0

Browse files
authored
Update airdrop function names (#496)
update airdrop function name
1 parent 2b97b02 commit 35c85e0

12 files changed

+20
-20
lines changed

contracts/prebuilts/interface/airdrop/IAirdropERC1155.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ interface IAirdropERC1155 {
4141
* @param tokenOwner The owner of the the tokens to transfer.
4242
* @param contents List containing recipient, tokenId to airdrop.
4343
*/
44-
function airdrop(
44+
function airdropERC1155(
4545
address tokenAddress,
4646
address tokenOwner,
4747
AirdropContent[] calldata contents

contracts/prebuilts/interface/airdrop/IAirdropERC20.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ interface IAirdropERC20 {
3838
* @param tokenOwner The owner of the the tokens to transfer.
3939
* @param contents List containing recipient, tokenId to airdrop.
4040
*/
41-
function airdrop(
41+
function airdropERC20(
4242
address tokenAddress,
4343
address tokenOwner,
4444
AirdropContent[] calldata contents

contracts/prebuilts/interface/airdrop/IAirdropERC721.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ interface IAirdropERC721 {
3838
* @param tokenOwner The owner of the the tokens to transfer.
3939
* @param contents List containing recipient, tokenId to airdrop.
4040
*/
41-
function airdrop(
41+
function airdropERC721(
4242
address tokenAddress,
4343
address tokenOwner,
4444
AirdropContent[] calldata contents

contracts/prebuilts/unaudited/airdrop/AirdropERC1155.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ contract AirdropERC1155 is
8989
* @param _tokenOwner The owner of the the tokens to transfer.
9090
* @param _contents List containing recipient, tokenId and amounts to airdrop.
9191
*/
92-
function airdrop(
92+
function airdropERC1155(
9393
address _tokenAddress,
9494
address _tokenOwner,
9595
AirdropContent[] calldata _contents

contracts/prebuilts/unaudited/airdrop/AirdropERC20.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ contract AirdropERC20 is
9090
* @param _tokenOwner The owner of the the tokens to transfer.
9191
* @param _contents List containing recipient, tokenId and amounts to airdrop.
9292
*/
93-
function airdrop(
93+
function airdropERC20(
9494
address _tokenAddress,
9595
address _tokenOwner,
9696
AirdropContent[] calldata _contents

contracts/prebuilts/unaudited/airdrop/AirdropERC721.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ contract AirdropERC721 is
8989
* @param _tokenOwner The owner of the the tokens to transfer.
9090
* @param _contents List containing recipient, tokenId to airdrop.
9191
*/
92-
function airdrop(
92+
function airdropERC721(
9393
address _tokenAddress,
9494
address _tokenOwner,
9595
AirdropContent[] calldata _contents

src/test/airdrop/AirdropERC1155.t.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ contract AirdropERC1155Test is BaseTest {
5555

5656
function test_state_airdrop() public {
5757
vm.prank(deployer);
58-
drop.airdrop(address(erc1155), address(tokenOwner), _contentsOne);
58+
drop.airdropERC1155(address(erc1155), address(tokenOwner), _contentsOne);
5959

6060
for (uint256 i = 0; i < countOne; i++) {
6161
assertEq(erc1155.balanceOf(_contentsOne[i].recipient, i % 5), 5);
@@ -71,15 +71,15 @@ contract AirdropERC1155Test is BaseTest {
7171
function test_revert_airdrop_notOwner() public {
7272
vm.prank(address(25));
7373
vm.expectRevert("Not authorized.");
74-
drop.airdrop(address(erc1155), address(tokenOwner), _contentsOne);
74+
drop.airdropERC1155(address(erc1155), address(tokenOwner), _contentsOne);
7575
}
7676

7777
function test_revert_airdrop_notApproved() public {
7878
tokenOwner.setApprovalForAllERC1155(address(erc1155), address(drop), false);
7979

8080
vm.startPrank(deployer);
8181
vm.expectRevert("Not balance or approved");
82-
drop.airdrop(address(erc1155), address(tokenOwner), _contentsOne);
82+
drop.airdropERC1155(address(erc1155), address(tokenOwner), _contentsOne);
8383
vm.stopPrank();
8484
}
8585
}

src/test/airdrop/AirdropERC20.t.sol

+5-5
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ contract AirdropERC20Test is BaseTest {
4949

5050
function test_state_airdrop() public {
5151
vm.prank(deployer);
52-
drop.airdrop(address(erc20), address(tokenOwner), _contentsOne);
52+
drop.airdropERC20(address(erc20), address(tokenOwner), _contentsOne);
5353

5454
for (uint256 i = 0; i < countOne; i++) {
5555
assertEq(erc20.balanceOf(_contentsOne[i].recipient), _contentsOne[i].amount);
@@ -60,13 +60,13 @@ contract AirdropERC20Test is BaseTest {
6060
function test_revert_airdrop_insufficientValue() public {
6161
vm.prank(deployer);
6262
vm.expectRevert("Insufficient native token amount");
63-
drop.airdrop(CurrencyTransferLib.NATIVE_TOKEN, address(tokenOwner), _contentsOne);
63+
drop.airdropERC20(CurrencyTransferLib.NATIVE_TOKEN, address(tokenOwner), _contentsOne);
6464
}
6565

6666
function test_revert_airdrop_notOwner() public {
6767
vm.startPrank(address(25));
6868
vm.expectRevert("Not authorized.");
69-
drop.airdrop(address(erc20), address(tokenOwner), _contentsOne);
69+
drop.airdropERC20(address(erc20), address(tokenOwner), _contentsOne);
7070
vm.stopPrank();
7171
}
7272

@@ -75,7 +75,7 @@ contract AirdropERC20Test is BaseTest {
7575

7676
vm.startPrank(deployer);
7777
vm.expectRevert("Not balance or allowance");
78-
drop.airdrop(address(erc20), address(tokenOwner), _contentsOne);
78+
drop.airdropERC20(address(erc20), address(tokenOwner), _contentsOne);
7979
vm.stopPrank();
8080
}
8181
}
@@ -118,7 +118,7 @@ contract AirdropERC20AuditTest is BaseTest {
118118

119119
function test_process_payments_with_non_compliant_token() public {
120120
vm.prank(deployer);
121-
drop.airdrop(address(erc20_nonCompliant), address(tokenOwner), _contentsOne);
121+
drop.airdropERC20(address(erc20_nonCompliant), address(tokenOwner), _contentsOne);
122122

123123
// check balances after airdrop
124124
for (uint256 i = 0; i < countOne; i++) {

src/test/airdrop/AirdropERC721.t.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ contract AirdropERC721Test is BaseTest {
4646

4747
function test_state_airdrop() public {
4848
vm.prank(deployer);
49-
drop.airdrop(address(erc721), address(tokenOwner), _contentsOne);
49+
drop.airdropERC721(address(erc721), address(tokenOwner), _contentsOne);
5050

5151
for (uint256 i = 0; i < 1000; i++) {
5252
assertEq(erc721.ownerOf(i), _contentsOne[i].recipient);
@@ -56,15 +56,15 @@ contract AirdropERC721Test is BaseTest {
5656
function test_revert_airdrop_notOwner() public {
5757
vm.prank(address(25));
5858
vm.expectRevert("Not authorized.");
59-
drop.airdrop(address(erc721), address(tokenOwner), _contentsOne);
59+
drop.airdropERC721(address(erc721), address(tokenOwner), _contentsOne);
6060
}
6161

6262
function test_revert_airdrop_notApproved() public {
6363
tokenOwner.setApprovalForAllERC721(address(erc721), address(drop), false);
6464

6565
vm.startPrank(deployer);
6666
vm.expectRevert("Not owner or approved");
67-
drop.airdrop(address(erc721), address(tokenOwner), _contentsOne);
67+
drop.airdropERC721(address(erc721), address(tokenOwner), _contentsOne);
6868
vm.stopPrank();
6969
}
7070
}

src/test/benchmark/AirdropERC1155Benchmark.t.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ contract AirdropERC1155BenchmarkTest is BaseTest {
5757
vm.pauseGasMetering();
5858
vm.prank(deployer);
5959
vm.resumeGasMetering();
60-
drop.airdrop(address(erc1155), address(tokenOwner), _contentsOne);
60+
drop.airdropERC1155(address(erc1155), address(tokenOwner), _contentsOne);
6161
}
6262
}

src/test/benchmark/AirdropERC20Benchmark.t.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ contract AirdropERC20BenchmarkTest is BaseTest {
5050
vm.pauseGasMetering();
5151
vm.prank(deployer);
5252
vm.resumeGasMetering();
53-
drop.airdrop(address(erc20), address(tokenOwner), _contentsOne);
53+
drop.airdropERC20(address(erc20), address(tokenOwner), _contentsOne);
5454
}
5555
}

src/test/benchmark/AirdropERC721Benchmark.t.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ contract AirdropERC721BenchmarkTest is BaseTest {
4848
vm.pauseGasMetering();
4949
vm.prank(deployer);
5050
vm.resumeGasMetering();
51-
drop.airdrop(address(erc721), address(tokenOwner), _contentsOne);
51+
drop.airdropERC721(address(erc721), address(tokenOwner), _contentsOne);
5252
}
5353
}

0 commit comments

Comments
 (0)