mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
swarm/services/chequebook: Upgrade contract for Solidity 4.3.0
This commit is contained in:
parent
b01dfb24fa
commit
1323a46fa0
1 changed files with 12 additions and 2 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
import "mortal";
|
pragma solidity ^0.4.3;
|
||||||
|
|
||||||
|
import "mortal.sol" as mortal;
|
||||||
|
|
||||||
/// @title Chequebook for Ethereum micropayments
|
/// @title Chequebook for Ethereum micropayments
|
||||||
/// @author Daniel A. Nagy <daniel@ethdev.com>
|
/// @author Daniel A. Nagy <daniel@ethdev.com>
|
||||||
|
|
@ -9,6 +11,14 @@ contract chequebook is mortal {
|
||||||
/// @notice Overdraft event
|
/// @notice Overdraft event
|
||||||
event Overdraft(address deadbeat);
|
event Overdraft(address deadbeat);
|
||||||
|
|
||||||
|
/// @notice Deposit event
|
||||||
|
event Deposit(uint256 amount);
|
||||||
|
|
||||||
|
/// @notice Top up chequebook
|
||||||
|
function() payable {
|
||||||
|
Deposit(msg.value);
|
||||||
|
}
|
||||||
|
|
||||||
/// @notice Cash cheque
|
/// @notice Cash cheque
|
||||||
///
|
///
|
||||||
/// @param beneficiary beneficiary address
|
/// @param beneficiary beneficiary address
|
||||||
|
|
@ -39,7 +49,7 @@ contract chequebook is mortal {
|
||||||
// owner.sendToDebtorsPrison();
|
// owner.sendToDebtorsPrison();
|
||||||
Overdraft(owner);
|
Overdraft(owner);
|
||||||
// Compensate beneficiary.
|
// Compensate beneficiary.
|
||||||
suicide(beneficiary);
|
selfdestruct(beneficiary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue