我将从编写总体配置开始(系统、版本、智能合同的总体构想)。
2-然后我将显示主要问题(使用小代码行,我认为它需要编辑)。
第3-第三部分,我将展示我到目前为止所尝试的内容和结果。
4-在结束时,我将为我的完整代码添加github链接。
注释:由mr生成的完整原始代码。PatrickAlphaC.
a-一般配置(系统、版本、智能合同总体思想):
15.3
E 116元钱包加载项E 217到火狐<代码>H 218<代码>H 119a6-目标块链:polygon(main网,测试网)<代码>H 222H 123A7-智能契约总体思想:使用svg创建<代码>E 124erc-721 nft<代码>e 225/>,其中的元数据完全存储在链(智能契约薄荷令牌到多边形链)上。b-主要问题:
当造币文件(tokenurl)的大小小于23.8kb(小于23.8kb)时,每件事情都工作得很好。其中我的目标是这个大小两倍的薄荷文件(每个令牌file等于50)。因此,当尝试使用大小为(23.8KB< size < 50 Kb)的时,我将收到下一个错误消息。
An unexpected error occurred:
Error: ERROR processing /home/naive/demos/secondtry/deploy/01_Deploy_SVGNFT.js:
Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"name":"ProviderError","code":-
32000,"_isProviderError":true}, method="estimateGas", transaction={"from":"metamask wallet address","to":"contract address",c-到目前为止我尝试的内容和结果:
c1-尝试在"hardhat.config“中设置气体限制,但没有产生任何效果(这是在搜索期间,所以我不记得表单或值)。c2-在"01_Deploy_SVGNFT“中向tx添加气体限制,因此代码行看起来类似于next.。
- c2-0 origonal code line before edit it: `tx = await svgNFT.create(svg)`
- c2-1 code line after edit it: `tx = await svgNFT.create(svg, {gasLimit: 3000000 })`
- c2-2 **the result**: give me some **error message about wrong syntic (forum, typing)**c3-在"01_Deploy_SVGNFT“中向tx添加气体限制,因此代码行看起来类似于next.。
- c3-0 origonal code line before edit it: `tx = await svgNFT.create(svg)`- c3-1 code line after edit it: `tx = await svgNFT.create({svg}, {gasLimit: 3000000 })`- c3-2 **the results:** - 3-2-0 contract deploying, svg uploading, contract verifying, the matic value decrease in metamask wallet(gas value transfer succeed) all thing look good.
- 3-2-1 when go to opensea there's no image appears.
- 3-2-2 when go to polygonscan or etherscan and use token id to see the token uri it return nothing (ther's no metadata string appears, nothing appears).d-获取完整代码的下一个github链接(contracts、deploy、hardhat.config.js、helper-hardhat-config.js和img包含(预先生成的令牌full )文件夹)。
https://github.com/naive2022/onchainfork
希望能帮助我找到在使用多边形测试或多边形主网络时,如何在没有这个问题的情况下制作预先制作的令牌(每个文件大小都是50 or )。
发布于 2022-02-17 00:14:55
最终结果rinkeby网络无法接受大小约为23 kb的(薄荷令牌url)。
https://stackoverflow.com/questions/71022437
复制相似问题