Some times it will occur “0x0 Transaction mined but execution failed” error when you execute contract function on Ethereum. If your contract is tested fully, the main reason should be you use a low gas limit for this function. For example, the metamsk will set gas limit automatically for you according to gas estimation, but if some dynamic parameters in your function changed (such as a function include a loop an d the loop count is decided by time or others’ input), the gas estimation will not output correct result, so the function may fail.
Using a larger gas limit can solve this. If it still not work, write test cases to check if your function works right.
0x0 Transaction mined but execution failed |