-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy path2-deploy-drop.js
More file actions
37 lines (32 loc) · 1.48 KB
/
2-deploy-drop.js
File metadata and controls
37 lines (32 loc) · 1.48 KB
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
import { AddressZero } from "@ethersproject/constants";
import sdk from "./1-initialize-sdk.js";
import { readFileSync } from "fs";
(async () => {
try {
const editionDropAddress = await sdk.deployer.deployEditionDrop({
// The collection's name, ex. CryptoPunks
name: "CokoDAO Membership",
// A description for the collection.
description: "A DAO for fans of Coko.",
// The image that will be held on our NFT! The fun part :).
image: readFileSync("scripts/assets/lotsofdogs.jpg"),
// We need to pass in the address of the person who will be receiving the proceeds from sales of nfts in the contract.
// We're planning on not charging people for the drop, so we'll pass in the 0x0 address
// you can set this to your own wallet address if you want to charge for the drop.
primary_sale_recipient: AddressZero,
});
// this initialization returns the address of our contract
// we use this to initialize the contract on the thirdweb sdk
const editionDrop = sdk.getEditionDrop(editionDropAddress);
// with this, we can get the metadata of our contract
const metadata = await editionDrop.metadata.get();
console.log(
"✅ Successfully deployed editionDrop contract, address:",
editionDropAddress,
);
console.log("✅ editionDrop metadata:", metadata);
} catch (error) {
console.log("failed to deploy editionDrop contract", error);
}
})();
// edition drop = 0x6288757CC1d20E19d48Fc44C99Eb222C3A2cEAD5