MetAmask -RPC错误:执行恢复。错误:无法估计气体

发布于 2025-02-13 00:05:37 字数 1980 浏览 1 评论 0 原文

我有一个

MetaMask - RPC Error: execution reverted {code: -32000, message: 'execution reverted'}
next-dev.js?3515:25 
Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (reason="execution reverted", method="estimateGas", transaction={"from":"0x563925491A8B3100c329d05292c059A84165dFB7","to":"0x159bB9B4A6b7f1165141Bc927a32237a143609C9","value":{"type":"BigNumber","hex":"0x016345785d8a0000"},"data":"0xd6febde800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001","accessList":null}, error={"code":-32000,"message":"execution reverted"}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.6.8)
        at Logger.makeError (index.js?dd68:219:1)
        at Logger.throwError (index.js?dd68:228:1)
        at checkError (json-rpc-provider.js?8679:76:1)
        at Web3Provider.eval (json-rpc-provider.js?8679:533:1)
        at Generator.throw (<anonymous>)
        at rejected (json-rpc-provider.js?8679:6:42)

我做了聪明的程序员教程的一切: https://www.youtube.com/watch?v=x3erxemb-4k&list = wl&amp; ab_channel = cleverProgrammer 。现在,在运行此代码之后,我有一个错误:

const buyItem = async (
    listingId = selectedMarketNft.id,
    quantityDesired = 1,
    module = marketPlaceModule
  ) => {
    console.log(listingId, quantityDesired, module, 'david')
    // yo RAZA lets goooo!!!
    //yo Qazi, ok
    // sure okay about to run it...
    // just clicked buy now...
    // still error
    // where can i see the contract address of the marketplace module
    // in [nftId.js]
    await module
      .buyoutDirectListing({listingId, quantityDesired})
      .catch((error) => console.error(error))

    confirmPurchase()
  }

I have a

MetaMask - RPC Error: execution reverted {code: -32000, message: 'execution reverted'}
next-dev.js?3515:25 
Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (reason="execution reverted", method="estimateGas", transaction={"from":"0x563925491A8B3100c329d05292c059A84165dFB7","to":"0x159bB9B4A6b7f1165141Bc927a32237a143609C9","value":{"type":"BigNumber","hex":"0x016345785d8a0000"},"data":"0xd6febde800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001","accessList":null}, error={"code":-32000,"message":"execution reverted"}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.6.8)
        at Logger.makeError (index.js?dd68:219:1)
        at Logger.throwError (index.js?dd68:228:1)
        at checkError (json-rpc-provider.js?8679:76:1)
        at Web3Provider.eval (json-rpc-provider.js?8679:533:1)
        at Generator.throw (<anonymous>)
        at rejected (json-rpc-provider.js?8679:6:42)

I did everything by Clever Programmer's tutorial: https://www.youtube.com/watch?v=x3eRXeMB-4k&list=WL&ab_channel=CleverProgrammer. And now I have this error after running this piece of code:

const buyItem = async (
    listingId = selectedMarketNft.id,
    quantityDesired = 1,
    module = marketPlaceModule
  ) => {
    console.log(listingId, quantityDesired, module, 'david')
    // yo RAZA lets goooo!!!
    //yo Qazi, ok
    // sure okay about to run it...
    // just clicked buy now...
    // still error
    // where can i see the contract address of the marketplace module
    // in [nftId.js]
    await module
      .buyoutDirectListing({listingId, quantityDesired})
      .catch((error) => console.error(error))

    confirmPurchase()
  }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文