I would like to invoke a fallback function of a contract from Mist Wallet. However, I am not able to see it in the drop down list of functions.
-
Could you supply a screenshot so we can see what your browser is doing? – Samuel Hawksby-Robinson Feb 23 '17 at 10:50
-
What is the need to explicitly invoke a fallback function? – Prashant Prabhakar Singh Feb 23 '17 at 12:38
Fallback function may be invoked when you send a transaction to the contract address The condition is that data
field must not match to the any signature of any contract function. In this case fallback function is invoked.
Leave data field empty and send payment to the contract is the usual way to invoke the fallback.
I was not able to invoke explicitly from Mist. However, I used .call() function to invoke the fallback function by passing a non existing function. ( clickk is a non existing function in my contract )
function invoke (address bt) { bool ret = address(bt).call(bytes4(sha3("clickk()"))); }