Commit 9c81dd29 by Arkadiy Kukarkin

Fix example contracts

parent bb22cd62
...@@ -7,7 +7,7 @@ contract BadPushPayments { ...@@ -7,7 +7,7 @@ contract BadPushPayments {
address highestBidder; address highestBidder;
uint highestBid; uint highestBid;
function bid() { function bid() payable {
if (msg.value < highestBid) throw; if (msg.value < highestBid) throw;
if (highestBidder != 0) { if (highestBidder != 0) {
......
...@@ -6,7 +6,7 @@ contract GoodPullPayments { ...@@ -6,7 +6,7 @@ contract GoodPullPayments {
uint highestBid; uint highestBid;
mapping(address => uint) refunds; mapping(address => uint) refunds;
function bid() external { function bid() external payable {
if (msg.value < highestBid) throw; if (msg.value < highestBid) throw;
if (highestBidder != 0) { if (highestBidder != 0) {
......
...@@ -8,7 +8,7 @@ contract PullPaymentBid is PullPayment { ...@@ -8,7 +8,7 @@ contract PullPaymentBid is PullPayment {
address public highestBidder; address public highestBidder;
uint public highestBid; uint public highestBid;
function bid() external { function bid() external payable {
if (msg.value <= highestBid) throw; if (msg.value <= highestBid) throw;
if (highestBidder != 0) { if (highestBidder != 0) {
......
...@@ -9,7 +9,7 @@ contract StoppableBid is Stoppable, PullPayment { ...@@ -9,7 +9,7 @@ contract StoppableBid is Stoppable, PullPayment {
address public highestBidder; address public highestBidder;
uint public highestBid; uint public highestBid;
function bid() external stopInEmergency { function bid() external payable stopInEmergency {
if (msg.value <= highestBid) throw; if (msg.value <= highestBid) throw;
if (highestBidder != 0) { if (highestBidder != 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment