You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to utilize the useContractFunction to send a merkle proof bytes32 array to one of my contract functions however when I send the proof data parameter I receive the UNPREDICTABLE_GAS_LIMIT error from ethers before the transaction even gets to metamask.
The main components to look at are within pages/collect-got.js and web3/contractButton.js.
The project is built on the theta blockchain and the contract I am testing with is deployed to theta testnet. To reproduce the bug you will need to pull the project, npm install, npm run dev and connect to theta testnet chain. You will also need some test tfuel which you can get from the theta wallet site faucet or I can send you some. From there navigate to the /collect-got page and click the 'CLAIM $GOT' button. You should see the unpredictable gas limit error in the console from there.
I also have tested other functions on the contract through this frontend with simpler data parameters and they work successfully so I have isolated the problem to this function's data param and this frontend/library.
Describe the bug
I am trying to utilize the useContractFunction to send a merkle proof bytes32 array to one of my contract functions however when I send the proof data parameter I receive the UNPREDICTABLE_GAS_LIMIT error from ethers before the transaction even gets to metamask.
To Reproduce
Here is a link to the repo and branch with the relevant work: https://github.com/davinharding/guardian-of-theta-frontend/tree/got-collection-page
The main components to look at are within pages/collect-got.js and web3/contractButton.js.
The project is built on the theta blockchain and the contract I am testing with is deployed to theta testnet. To reproduce the bug you will need to pull the project, npm install, npm run dev and connect to theta testnet chain. You will also need some test tfuel which you can get from the theta wallet site faucet or I can send you some. From there navigate to the
/collect-got
page and click the 'CLAIM $GOT' button. You should see the unpredictable gas limit error in the console from there.I have tested this function with the same merkle proof array that my app generates on the theta wallet contract interaction tool (similar to etherscan contract function read and write tool) and the function works there with a successful blockchain txn and an expected revert error. Link to successful txn: https://testnet-explorer.thetatoken.org/txs/0x880e5b22322be6151bd31cb1cc92d96cff9a739458db6c6a2d3ca12697c5bd9e
I also have tested other functions on the contract through this frontend with simpler data parameters and they work successfully so I have isolated the problem to this function's data param and this frontend/library.
Here is my useDapp config object:
I am using an injected metamask wallet.
Software versions
"@usedapp/core": "^1.1.2",
"npm": '8.19.4',
"node": '16.20.0',
"ethers": "^5.7.2",
Additional context
Here is what the proof that is being submitted looks like:
And the error for reference:
Any help would be much appreciated and thank you for providing this very useful library!
The text was updated successfully, but these errors were encountered: