1

I'm getting the following error:

{ code: 13, message: 'execution simulation failed: status = 106' }

When executing this code:

const gasEstimate = await WJEWELContract.methods.mint(amount).estimateGas({from: account.address}, function(estimatedGas) { console.log(estimatedGas) });

WJEWELContract is just an ERC20 with a "mint" method.

Does anybody know what this can be?

Thanks!

1 Answer 1

0

The problem was I wasn't calling the method the right way:

    const gasEstimate = WJEWELContract.methods.mint(amount)
        .estimateGas(
            {
                from: account.address,
                gasPrice: _gasPrice
            }, function(error, estimatedGas) {
                console.log(estimatedGas)
            }
        )
    });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.