contracts icon indicating copy to clipboard operation
contracts copied to clipboard

Failed to get upload token

Open badDevBuild opened this issue 3 years ago • 0 comments

Hi when I run the 2-deploy-drop.js in Buildspace project Build your own DAO with just Javascript in a weekend. I get an error. Could anyone help ? Thanks

Below is the code and the error info.

`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: "shushuDAO Membership", // A description for the collection. description: "A DAO for fans of SHUSHU.", // The image that will be held on our NFT! The fun part :). image: readFileSync("scripts/assets/1.png"), // 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); } })();`

failed to deploy editionDrop contract FetchError: FETCH_FAILED: Failed to get upload token at zt.getUploadToken (D:\tt\buildspace-dao-starter\node_modules@thirdweb-dev\sdk\dist\index.js:15:1748) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async zt.uploadBatchWithCid (D:\tt\buildspace-dao-starter\node_modules@thirdweb-dev\sdk\dist\index.js:15:3119) at async zt.batchUploadProperties (D:\tt\buildspace-dao-starter\node_modules@thirdweb-dev\sdk\dist\index.js:15:2723) at async zt.uploadMetadataBatch (D:\tt\buildspace-dao-starter\node_modules@thirdweb-dev\sdk\dist\index.js:15:2098) at async zt.uploadMetadata (D:\tt\buildspace-dao-starter\node_modules@thirdweb-dev\sdk\dist\index.js:15:2002) at async pa.deploy (D:\tt\buildspace-dao-starter\node_modules@thirdweb-dev\sdk\dist\index.js:15:249292) at async Pn.deployBuiltInContract (D:\tt\buildspace-dao-starter\node_modules@thirdweb-dev\sdk\dist\index.js:15:252554) at async Pn.deployEditionDrop (D:\tt\buildspace-dao-starter\node_modules@thirdweb-dev\sdk\dist\index.js:15:251978) at async file:///D:/tt/buildspace-dao-starter/scripts/2-deploy-drop.js:7:32 { innerError: undefined

badDevBuild avatar Jul 15 '22 08:07 badDevBuild