【问题标题】:Error When minting ERC721 on Matic Testnet在 Matic 测试网上铸造 ERC721 时出错
【发布时间】:2021-09-01 18:06:55
【问题描述】:

寻求帮助以解决以下错误。我正在尝试在 Matic 测试网上铸造一个 ERC721 nft。我正在使用安全帽,并尝试了以下 tesntnet 网络,这些网络给了我同样的错误:

https://matic-mumbai.chainstacklabs.com

https://rpc-mumbai.maticvigil.com

https://polygon-mumbai.g.alchemy.com/v2/

我能够在 Matic 测试网上成功部署我的 ERC721 智能合约。但是当我尝试铸造 NFT 时,我遇到了以下错误:

(node:53836) UnhandledPromiseRejectionWarning: Error: Network doesn't support eip-1559
    at /Users/gravitywaves/Projects/mynft2/node_modules/web3-eth-accounts/lib/index.js:323:35
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:53836) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:53836) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

【问题讨论】:

    标签: matic


    【解决方案1】:

    我在这里进行了大胆的猜测,但您可能会在交易中包含maxFeePerGas,这就是根据 EIP-1559 发送交易的方式。 AFAIK(我可能错了)Polygon 还没有实现 EIP-1559。

    在您的交易中尝试将 maxFeePerGas 链接为 gasPrice。我遇到了完全相同的错误,这对我有用。

    另外,在我的例子中,我能够通过 Remix 向部署的合约发送交易,所以我确信我的代码有问题。您可能想要运行相同的检查。

    【讨论】:

    • 我从交易中删除了maxPriorityFeePerGas,它成功了!
    猜你喜欢
    • 1970-01-01
    • 2022-07-01
    • 2021-06-04
    • 1970-01-01
    • 2019-02-17
    • 2020-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多