I cannot figure out why the transaction is getting reverted by Mumbai testnet.
It works fine in Remix EVM and Hardhat testsuite but is getting reverted on mumbai
and rinkeby
networks, I haven't tested other EVM networks but I think result would be the same.
This is the contract function I'm calling:
function addAllPotentialWinnings(
uint256 _eventNumber,
uint256[][] memory _potentialWinnings,
uint256[] memory _chainsList,
address[] memory _winnersList
) public onlyOwner {
winnersList[_eventNumber] = _winnersList;
updateChains(_eventNumber, _chainsList);
for (uint i = 0; i < _winnersList.length; i++) {
updatePotentialWinnings(_eventNumber,_winnersList[i],_potentialWinnings[i]);}}
I provide it with with the data that fits the proposed schema. But the execution is reverted. Here is the exact data I provided to the execution:
(0, [[3700000000000, 617288888888888]],[4,80001],["0xE57EF8ba635f6659685d1A84c04c112D63619Ee5"])
Reverted transaction on blockexplorer and the verified contract I'm working with.
I call the transaction from the front end with ethers.js
and after making the call metamask
confirmation window pops up where I confirm the transaction but later (~15-20s) after the transaction is mined I get the metamask error in a pop up.
Other state changing transactions are going through. What am I doing wrong?