Skip to content

Commit

Permalink
update import
Browse files Browse the repository at this point in the history
  • Loading branch information
0xble committed May 7, 2024
1 parent 5252099 commit eeee590
Show file tree
Hide file tree
Showing 11 changed files with 219 additions and 318 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
[submodule "lib/v3-periphery"]
path = lib/v3-periphery
url = https://github.com/ChrisiPK/v3-periphery
[submodule "lib/dropper-util"]
path = lib/dropper-util
url = https://github.com/PartyDAO/dropper-util
32 changes: 32 additions & 0 deletions broadcast/Deploy.s.sol/84532/dry-run/run-1715091428.json

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions broadcast/Deploy.s.sol/84532/dry-run/run-latest.json

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions broadcast/Deploy.s.sol/84532/run-1715091459.json

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions broadcast/Deploy.s.sol/84532/run-1715091503.json

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions broadcast/Deploy.s.sol/84532/run-latest.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/dropper-util
Submodule dropper-util added at d49770
16 changes: 16 additions & 0 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8;

import "forge-std/Script.sol";
import "src/ERC20Airdropper.sol";

contract DeployScript is Script {
function run() external {
vm.startBroadcast();
ERC20Airdropper airdropper = new ERC20Airdropper(
Dropper(address(0x2871e49a08AceE842C8F225bE7BFf9cC311b9F43))
);
console.log(address(airdropper));
vm.stopBroadcast();
}
}
6 changes: 3 additions & 3 deletions src/ERC20Airdropper.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8;

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

contract ERC20Airdropper {
struct TokenArgs {
Expand Down
306 changes: 0 additions & 306 deletions src/vendor/Dropper.sol

This file was deleted.

11 changes: 2 additions & 9 deletions test/ERC20Airdropper.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pragma solidity ^0.8;

import "forge-std/Test.sol";
import "src/ERC20Airdropper.sol";
import "src/vendor/Dropper.sol";

contract ERC20AirdropperTest is Test {
event ERC20Created(
Expand Down Expand Up @@ -72,10 +71,7 @@ contract ERC20AirdropperTest is Test {
dropArgs.expirationTimestamp
);

(ERC20 token, uint256 dropId) = airdropper.createTokenAndAirdrop(
tokenArgs,
dropArgs
);
(ERC20 token, uint256 dropId) = airdropper.createTokenAndAirdrop(tokenArgs, dropArgs);

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

assertEq(token.balanceOf(address(dropper)), dropArgs.totalTokens);
assertEq(
token.balanceOf(address(this)),
tokenArgs.totalSupply - dropArgs.totalTokens
);
assertEq(token.balanceOf(address(this)), tokenArgs.totalSupply - dropArgs.totalTokens);
}

function testCreateTokenAndAirdrop_noRemainingBalance() public {
Expand Down

0 comments on commit eeee590

Please sign in to comment.