Questions dealing with the Solidity fallback function
Questions tagged [fallback-function]
140 questions
3
votes
1 answer
TypeError: Fallback function must be defined as "external"
function() public payable{
^
pragma solidity ^0.5.0;
import "./EIP20Interface.sol";
contract InitialTokenOfferingIncomeFAIR is EIP20Interface {
uint256 constant private MAX_UINT256 = 2**256 - 1;
mapping (address => uint256) public…
Ecofintech
- 171
- 3
- 10
1
vote
1 answer
decompiler smart contract code, how to read the result?
i scanned the smart contract in the decompiler, how will the withdrawal function be translated?
tomas
- 41
- 4
1
vote
1 answer
How to connect our smart contract that contains the fallback function to the imported smart contract?
i'm still confused, i'm importing a smart contract address on remix ethereum via ABI, i think for the fallback function it make sense to type the contract source code or use the ABI, i hope i am right about this. also my main question is ,,How do i…
tomas
- 41
- 4
0
votes
2 answers
Is payable fallback function not always invoked?
In the recommendations for smart contract security I read the following:
"
Remember that Ether can be forcibly sent to an account
Beware of coding an invariant that strictly checks the balance of a contract.
An attacker can forcibly send wei to any…
matthias_buehlmann
- 733
- 6
- 14
0
votes
1 answer
Why do I need fallback function here?
I have a payable function that transfers ether to contract.
function test(...) public payable returns (bool) {
...
…
bbusdriver
- 1,144
- 2
- 18
- 33
0
votes
0 answers
Why fallback() function exists?
I am studying the fallback function, but I cannot still understand why "fallback() external payable {} " exists. It seems like it can cause security problems. why we define fallback function? what is it's usage? Can we replace this function with…
Wonjae Choi
- 117
- 5