mirror of https://github.com/crytic/slither
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.
29 lines
668 B
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;
|
|
}
|
|
}
|
|
|