myContractInstance.methods.approve('0x...', 300).call(function(error, approve){

        if(approve){console.log("allowance for this address :"+ approve)};

Hi, what's the problem with the function? It doesn't work.. Thanks


Function approve is not constant (neither pure nor view).

You should therefore execute it using send instead of call.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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