1

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()
  }

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.