Code coverage for Solidity smart-contracts
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.
|
|
|
pragma solidity ^0.5.0;
|
|
|
|
|
|
|
|
contract Wallet {
|
|
|
|
|
|
|
|
event Deposit(address indexed _sender, uint _value);
|
|
|
|
|
|
|
|
function transferPayment(uint payment, address payable recipient) public {
|
|
|
|
recipient.transfer(payment);
|
|
|
|
}
|
|
|
|
|
|
|
|
function sendPayment(uint payment, address payable recipient) public {
|
|
|
|
if (!recipient.send(payment))
|
|
|
|
revert();
|
|
|
|
}
|
|
|
|
|
|
|
|
function getBalance() public view returns(uint){
|
|
|
|
return address(this).balance;
|
|
|
|
}
|
|
|
|
|
|
|
|
function() external payable
|
|
|
|
{
|
|
|
|
if (msg.value > 0)
|
|
|
|
emit Deposit(msg.sender, msg.value);
|
|
|
|
}
|
|
|
|
}
|