gpt4 book ai didi

ThirdWeb:- Failed to get upload token(ThirdWeb:-无法获取上载令牌)

转载 作者:bug小助手 更新时间:2023-10-26 20:17:25 37 4
gpt4 key购买 nike



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

我在部署npx[电子邮件受保护]时遇到此错误,当我安装npx Third dweb@Latest Create时,合同也给了我一些错误,现在请帮助我如何解决这个问题我尝试了所有方法,但找不到解决方案


✔ 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

这是我的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

我希望它部署成功,并显示第三个Web仪表板链接


更多回答
优秀答案推荐

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:

您正在使用旧版本和旧命令通过CLI创建合同,以下是您应该使用的最新版本和命令:


npx thirdweb create contract

Also with the latest version you need to get an API key and enter into the CLI as shown in the thirdweb docs here:

此外,对于最新版本,您需要获取API密钥并进入CLI,如此处的第三个Web文档所示:


https://portal.thirdweb.com/api-keys

Https://portal.thirdweb.com/api-keys


更多回答

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com