I am testing out my subscription method on the test network Sepolia. I tried using this paySubscription function on hardhat and it worked, but i need it on frontend in next.js and now it prompts me with metamask and when i submit the transaction i get Transaction reverted by evm error after about 15 seconds.
Here is the function i am trying to pay to, followed by my frontend function.
I can provide you with the full error if that helps ,
web3.min.js:2 Uncaught (in promise) Error: Transaction has been reverted by the EVM:
{
"blockHash": "0xee343a4824a7a1cb78aefaf040adc95fd8df9516d03b0202488710cc0ffb1b4d",
"blockNumber": 3878815,
"contractAddress": null,
"cumulativeGasUsed": 23993,
"effectiveGasPrice": 50000000009,
"from": "0x363588a028a2cdaa7400f0e8ea3b6f2e19dddcaa",
"gasUsed": 23993,
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": false,
"to": "0xefed8093e6907544da4486b37994582fb36ceda4",
"transactionHash": "0x732628e5d136f4911aa2ae3090f91bb8c891be2c9ae314de8ddbc79ec9809847",
"transactionIndex": 0,
"type": "0x2",
"events": {}
}
at Object.TransactionError (web3.min.js:2:964004)
at Object.TransactionRevertedWithoutReasonError (web3.min.js:2:964370)
at eval (web3.min.js:2:980392)
at h (web3.min.js:2:1103143)
at Generator.eval (web3.min.js:2:1104512)
at Generator.eval [as next] (web3.min.js:2:1103514)
at t (web3.min.js:2:1097739)
at s (web3.min.js:2:1097960)
at eval (web3.min.js:2:1098019)
at new Promise (<anonymous>)
at eval (web3.min.js:2:1097893)
at eval (web3.min.js:2:980730)