I got this error while npx [email protected] deploy and when i install npx thirdweb@latest create --contract then also it give my some error now please help me how I can solve this problem I tried everything but not able to find the solution
✔ Detected project type: hardhat
✔ Compilation successful
✔ Processing contract: "CrowdFunding"
✖ Error uploading metadata
Error Failed to get upload token
error stack:
• thirdweb-dev-storage.cjs.prod.js:365 getUploadToken
C:\Users\Lenovo\AppData\Local\npm-cache\_npx\42aeb50a0940685c\node_modules\storage\dist\thirdweb-dev-storage.cjs.prod.js:365:13
• task_queues:95 processTicksAndRejections
node:internal\process\task_queues:95:5
• thirdweb-dev-storage.cjs.prod.js:514 uploadBatchNode
C:\Users\Lenovo\AppData\Local\npm-cache\_npx\42aeb50a0940685c\node_modules\storage\dist\thirdweb-dev-storage.cjs.prod.js:514:19
• thirdweb-dev-storage.cjs.prod.js:694 uploadBatch
C:\Users\Lenovo\AppData\Local\npm-cache\_npx\42aeb50a0940685c\node_modules\storage\dist\thirdweb-dev-storage.cjs.prod.js:694:14
• thirdweb-dev-storage.cjs.prod.js:655 upload
C:\Users\Lenovo\AppData\Local\npm-cache\_npx\42aeb50a0940685c\node_modules\storage\dist\thirdweb-dev-storage.cjs.prod.js:655:19
• processor.ts:191 <anonymous>
C:\Users\Lenovo\AppData\Local\npm-cache\_npx\42aeb50a0940685c\node_modules\thirdweb\src\common\processor.ts:191:22
• processor.ts:185 c1
C:\Users\Lenovo\AppData\Local\npm-cache\_npx\42aeb50a0940685c\node_modules\thirdweb\src\common\processor.ts:185:11
• index.ts:47 M2
C:\Users\Lenovo\AppData\Local\npm-cache\_npx\42aeb50a0940685c\node_modules\thirdweb\src\deploy\index.ts:47:15
• index.ts:122 <anonymous>
C:\Users\Lenovo\AppData\Local\npm-cache\_npx\42aeb50a0940685c\node_modules\thirdweb\src\cli\index.ts:122:19
PS E:\TUTORIALS-web\PROJECT\blockchain\crowd-funding\web3>
this is my hardhat.config.js
require("@matterlabs/hardhat-zksync-solc");
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
zksolc: {
version: "1.3.9",
compilerSource: "binary",
defaultNetwork: "sepolia",
networks: {
hardhat: {},
sepolia: {
url: "https://rpc.ankr.com/eth_sepolia",
accounts: [`0x${process.env.PRIVATE_KEY}`],
},
},
settings: {
optimizer: {
enabled: true,
},
},
},
networks: {
zksync_testnet: {
url: "https://zksync2-testnet.zksync.dev",
ethNetwork: "goerli",
chainId: 280,
zksync: true,
},
zksync_mainnet: {
url: "https://zksync2-mainnet.zksync.io/",
ethNetwork: "mainnet",
chainId: 324,
zksync: true,
},
},
paths: {
artifacts: "./artifacts-zk",
cache: "./cache-zk",
sources: "./contracts",
tests: "./test",
},
solidity: {
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
};
I want that it deploy successfully and thirdweb dashboard link are shown
You're using the older version and the older command to create your contract via the CLI, Here's the latest version and command you should use:
Also with the latest version you need to get an API key and enter into the CLI as shown in the thirdweb docs here:
https://portal.thirdweb.com/api-keys