I am running into quite a puzzling problem. I have built an app that execute on Polygon or in this case Amoy (testnet) and is essentially like a vending machine. You can add items then via contract executes purchasing and transfers amount. Until recent I have had no issues with this but now for whatever reason only a single address in my test wallet can add an item without getting the web3validationError. The even more odd part is if that wallet adds an item the other addresses can interact to purchase but when I go to add an item with the additional addresses i get this error.
Web3ValidatorError
at _Validator.validate (web3.js?v=2814477f:8140:15)
at Web3Validator.validate (web3.js?v=2814477f:8216:28)
at Object.<anonymous> (web3.js?v=2814477f:26861:19)
Any thoughts on what I can check or test to figure out what is happening here would be greatly appreciated.
code snippet of where the error pops up …
const transactionPromise = web3.eth.sendTransaction(transactionObject);
transactionPromise.on('transactionHash', (transactionHash) => {
console.log('Transaction Hash:', transactionHash);
addJobLatestTransactionHash({ uid: token_uri, hash: transactionHash, state: 'pending' })
.then(() => {
console.log('Transaction Hash updated on server:', { uid: token_uri, hash: transactionHash });
return transactionHash
})
.catch(error => {
console.error('Error updating job details on server:', error);
});
});
like i said this executes no problem with a single address but not others. Then after this step other addresses can execute calls no problem just can’t run the above sendTransaction().
Thank you
- I have verified wallet addresses
- I have tried my best to verify my web3 object as well as my contract object that it interacts with. For what I can see they are identical regardless of what address I am trying to execute it with.
Tyde Meadows is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.