generated from ProjectOpenSea/shipyard
-
Notifications
You must be signed in to change notification settings - Fork 123
/
DeployAndConfigureExampleToken.s.sol
64 lines (51 loc) · 1.79 KB
/
DeployAndConfigureExampleToken.s.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "forge-std/Script.sol";
import { ERC721SeaDrop } from "../src/ERC721SeaDrop.sol";
import { ISeaDrop } from "../src/interfaces/ISeaDrop.sol";
import { PublicDrop } from "../src/lib/SeaDropStructs.sol";
contract DeployAndConfigureExampleToken is Script {
// Addresses
address seadrop = 0x00005EA00Ac477B1030CE78506496e8C2dE24bf5;
address creator = 0x26faf8AE18d15Ed1CA0563727Ad6D4Aa02fb2F80;
address feeRecipient = 0x0000a26b00c1F0DF003000390027140000fAa719;
// Token config
uint256 maxSupply = 100;
// Drop config
uint16 feeBps = 500; // 5%
uint80 mintPrice = 0.0001 ether;
uint16 maxTotalMintableByWallet = 5;
function run() external {
vm.startBroadcast();
address[] memory allowedSeadrop = new address[](1);
allowedSeadrop[0] = seadrop;
ERC721SeaDrop token = new ERC721SeaDrop(
"My Example Token",
"ExTKN",
allowedSeadrop
);
// Configure the token.
token.setMaxSupply(maxSupply);
// Configure the drop parameters.
token.updateCreatorPayoutAddress(seadrop, creator);
token.updateAllowedFeeRecipient(seadrop, feeRecipient, true);
token.updatePublicDrop(
seadrop,
PublicDrop(
mintPrice,
uint48(block.timestamp), // start time
uint48(block.timestamp) + 1000, // end time
maxTotalMintableByWallet,
feeBps,
true
)
);
// We are ready, let's mint the first 3 tokens!
ISeaDrop(seadrop).mintPublic{ value: mintPrice * 3 }(
address(token),
feeRecipient,
address(0),
3 // quantity
);
}
}