thirdweb-dev / js

Best in class web3 SDKs for Browser, Node and Mobile apps
https://thirdweb.com
Apache License 2.0
433 stars 338 forks source link

[CRITICAL]Transactions not working Thirdweb Dashboard through wallet connect on Polygon Mainnet Chain #1829

Closed hammasxd closed 8 months ago

hammasxd commented 11 months ago

Capture getting overflow error while minting token on Polygon scan. here is the code

const {contract}= useContract(params.contractAddress); const metadataNFT = { name: "Hanami", description: "Hanami from Jujutsu Kaizen", }; const mintNFT = async ()=>{ await contract?.erc721.mint(metadataNFT).then((tr)=>{ console.log('this is minted nft : ',tr).catch(err){ console.log(err) }; }) } this is the contract address on Polygon : 0x24696D2D5328C9c2D361C370637e1CE827dbcDF0 Error occurs when i click on confirm in my Metamask Mobile wallet(conencted through WC) but transaction still continues and get confirmed on chain.

Capture2 Ive tested it on https://thirdweb.com/dashboard/contracts/deploy It is showing the same error when deploying on polygon mainnet it is a thirdweb related issue kindly solve it fast its fatal.

I've tested the same code with a collection contract on Elysium Testnet chainID : 1338 contractAddress:0x103A1b9194c78f38A40CfB3F21d59B521E5072AD and it is working fine but on Polygon Mainnet it is showing this issue. TO INVOKE THIS deploy a collection contract on Polygon test this function after setingup providers and conencting MM through WC using connect wallet UI component and running the provided mint function.

kien-ngo commented 11 months ago

Hi @hammasxd thanks for reporting this. We're looking into this atm. Any chance you can share the whole error message?

Fabioepb commented 11 months ago

Hey @kien-ngo, I'm not sure on wether this is on WalletConnect's side or Thirdweb-dev, so I've left extra information on the issues of both libraries.

This seems to happen with other mobile wallets as well, I've tested MetaMask mobile wallet, Trust Wallet and Fireblocks. They all experience the same NUMERIC_FAULT error.

The actual error message: overflow [ See: https://links.ethers.org/v5-errors-NUMERIC_FAULT-overflow ] (fault="overflow", operation="toNumber", value="39429324759775805056870346697879527774854152784605618705975791686434047059132", code=NUMERIC_FAULT, version=bignumber/5.7.0)

Steps to reproduce:

  1. Connect any Mobile Wallet app using WalletConnect (Through thirdweb-dev/react)
  2. Sign any transaction
  3. Tx approval is sent to mobile wallet
  4. Approve the tx
  5. The transaction will fail after being parsed on the front end
    • Note: The transaction does succesfully get submitted to the blockchain, it's just the parsing afterwards for the hash that causes the issue
hammasxd commented 11 months ago

@Fabioepb this is wallet connects side issue i think because ive tried the same process on open sea polygon chain and its showing error in terminal (diff from this because transactions happen in backend) but it get stuck on waiting for trasasction to confirm on your wallet.

Wagalidoom commented 11 months ago

I have the exact same issue (overflow error while the transaction still valid) on Goerli chain. Someone find the way to fix this? Thank you.

wadader commented 9 months ago

Similiar issue. I'm not minting but I get a minting overflow error. Similarly, while using wallet connect. Following

maximeclaisse commented 8 months ago

Similar issue here, with a marketplace contract, calling buyDirectlisting

kien-ngo commented 8 months ago

Ty everyone for reporting, we will let you know once there's a fix rolled out for this issue!

MananTank commented 8 months ago

Hi @hammasxd, @Fabioepb, @maximeclaisse, @wadader, @Wagalidoom

The root cause of this issue was the polygon RPC - we have fixed this issue now