When I sign and send raw transactions with web3 in javascipt , to call a method from Smart Contract, I always pass the transaction gas variable after getting it with estimateGas function, from Smart Contract method, as following:
mySmartContract= new web3.eth.Contract(SmartContractABI, SmartContractAddress);
mySmartContract.methods.set(inputnum).estimateGas({from: miAddress})
.then(function(gas){
tx.gas = web3.utils.toHex(gas);
})
.catch(function(error){
console.log("Set() - catch error");
console.log(error);
});
How could I do the same to invoke the fallback function from the Smart Contract? estimateGas() is a function from "methods" object, but "fallback" is not a method.
Thanks in advance