2

寻求帮助以解决以下错误。我正在尝试在 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.
4

1 回答 1

2

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

尝试maxFeePerGasgasPrice您的交易中进行链接。我遇到了完全相同的错误,这对我有用。

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

于 2021-09-02T21:47:43.753 回答