Skip to content

Commit d18c3ba

Browse files
committed
update import
1 parent 5252099 commit d18c3ba

11 files changed

+209
-318
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
[submodule "lib/v3-periphery"]
2323
path = lib/v3-periphery
2424
url = https://github.com/ChrisiPK/v3-periphery
25+
[submodule "lib/dropper-util"]
26+
path = lib/dropper-util
27+
url = https://github.com/PartyDAO/dropper-util

broadcast/Deploy.s.sol/84532/dry-run/run-1715091428.json

+30
Large diffs are not rendered by default.

broadcast/Deploy.s.sol/84532/dry-run/run-latest.json

+30
Large diffs are not rendered by default.

broadcast/Deploy.s.sol/84532/run-1715091459.json

+30
Large diffs are not rendered by default.

broadcast/Deploy.s.sol/84532/run-1715091503.json

+47
Large diffs are not rendered by default.

broadcast/Deploy.s.sol/84532/run-latest.json

+47
Large diffs are not rendered by default.

lib/dropper-util

Submodule dropper-util added at d497707

script/Deploy.s.sol

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SPDX-License-Identifier: Unlicense
2+
pragma solidity ^0.8;
3+
4+
import "forge-std/Script.sol";
5+
import "src/ERC20Airdropper.sol";
6+
7+
contract DeployScript is Script {
8+
function run() external {
9+
vm.startBroadcast();
10+
ERC20Airdropper airdropper = new ERC20Airdropper(
11+
Dropper(address(0x2871e49a08AceE842C8F225bE7BFf9cC311b9F43))
12+
);
13+
console.log(address(airdropper));
14+
vm.stopBroadcast();
15+
}
16+
}

src/ERC20Airdropper.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8;
33

4-
import {GovernableERC20} from "./GovernableERC20.sol";
5-
import {ERC20} from "openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
6-
import {Dropper} from "./vendor/Dropper.sol";
4+
import { GovernableERC20 } from "./GovernableERC20.sol";
5+
import { ERC20 } from "openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
6+
import { Dropper } from "dropper-util/src/Dropper.sol";
77

88
contract ERC20Airdropper {
99
struct TokenArgs {

src/vendor/Dropper.sol

-306
This file was deleted.

test/ERC20Airdropper.t.sol

+2-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ pragma solidity ^0.8;
33

44
import "forge-std/Test.sol";
55
import "src/ERC20Airdropper.sol";
6-
import "src/vendor/Dropper.sol";
76

87
contract ERC20AirdropperTest is Test {
98
event ERC20Created(
@@ -72,10 +71,7 @@ contract ERC20AirdropperTest is Test {
7271
dropArgs.expirationTimestamp
7372
);
7473

75-
(ERC20 token, uint256 dropId) = airdropper.createTokenAndAirdrop(
76-
tokenArgs,
77-
dropArgs
78-
);
74+
(ERC20 token, uint256 dropId) = airdropper.createTokenAndAirdrop(tokenArgs, dropArgs);
7975

8076
assertEq(token.name(), tokenArgs.name);
8177
assertEq(token.symbol(), tokenArgs.symbol);
@@ -101,10 +97,7 @@ contract ERC20AirdropperTest is Test {
10197
assertEq(expirationRecipient, dropArgs.expirationRecipient);
10298

10399
assertEq(token.balanceOf(address(dropper)), dropArgs.totalTokens);
104-
assertEq(
105-
token.balanceOf(address(this)),
106-
tokenArgs.totalSupply - dropArgs.totalTokens
107-
);
100+
assertEq(token.balanceOf(address(this)), tokenArgs.totalSupply - dropArgs.totalTokens);
108101
}
109102

110103
function testCreateTokenAndAirdrop_noRemainingBalance() public {

0 commit comments

Comments
 (0)