Skip to content

wenyangliu/my-nft-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

使用Pinata上传NFT到Opensea

运行项目

根目录创建 .env 文件

ALCHEMY_API_KEY_URL = "xxxx"
PRIVATE_KEY = "xxxx"
ETHERSCAN_API = "xxxx"

pinata 目录下创建 .env 文件

PINATA_API_KEY = "xxxx"
PINATA_API_SECRET = "xxxx"

安装

npm i
npx hardhat run scripts/deploy.js --network rinkeby

得到合约地址 运行

npx hardhat verify --network rinkeby [你的合约地址]

如果上面运行不成功,需要修改 hardhat.config.js

const proxyAgent = new ProxyAgent('http://127.0.0.1:7890') // 这里需要改成你的代理地址
cd pinata
npm i
node index.js

详细教程参考: https://wenyangliu.github.io/wenyangliublog/blogs/frontEnd/2022/07/06.html

Releases

No releases published

Packages

No packages published