Static Analyzer for Solidity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
slither/tests/unit/core/test_data/fallback.sol

29 lines
668 B

pragma solidity ^0.6.12;
contract FakeFallback {
mapping(address => uint) public contributions;
address payable public owner;
constructor() public {
owner = payable(msg.sender);
contributions[msg.sender] = 1000 * (1 ether);
}
function fallback() public payable {
contributions[msg.sender] += msg.value;
}
function receive() public payable {
contributions[msg.sender] += msg.value;
}
}
contract Fallback is FakeFallback {
receive() external payable {
contributions[msg.sender] += msg.value;
}
fallback() external payable {
contributions[msg.sender] += msg.value;
}
}