i came to know that 'call' method is better for transacting, since all gas is transferred and could withstand reentrancy attack.. but how should we define fallback function for 'call' method? using solidity ^0.6.0
Should we use fallback() external payable{} or receive() external payable {} ?
when i used fallback() external payable{} remix gave me this warning
Warning: This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function. contract MultiSig{ ^ (Relevant source part starts here and spans across multiple lines). browser/wallet.sol:37:5: The payable fallback function is defined here. fallback() payable external {}
Please explain which fallback function to be used for this scenario and in general what should be used when? And also how will it guard against reentrancy?