Skip to content

Commit 054a506

Browse files
authored
Updated blind-auction
changed public to external
1 parent 77a0cc7 commit 054a506

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/examples/blind-auction.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ to receive their money - contracts cannot activate themselves.
7979
/// together with this transaction.
8080
/// The value will only be refunded if the
8181
/// auction is not won.
82-
function bid() public payable {
82+
function bid() external payable {
8383
// No arguments are necessary, all
8484
// information is already part of
8585
// the transaction. The keyword payable
@@ -113,7 +113,7 @@ to receive their money - contracts cannot activate themselves.
113113
}
114114
115115
/// Withdraw a bid that was overbid.
116-
function withdraw() public returns (bool) {
116+
function withdraw() external returns (bool) {
117117
uint amount = pendingReturns[msg.sender];
118118
if (amount > 0) {
119119
// It is important to set this to zero because the recipient
@@ -132,7 +132,7 @@ to receive their money - contracts cannot activate themselves.
132132
133133
/// End the auction and send the highest bid
134134
/// to the beneficiary.
135-
function auctionEnd() public {
135+
function auctionEnd() external {
136136
// It is a good guideline to structure functions that interact
137137
// with other contracts (i.e. they call functions or send Ether)
138138
// into three phases:
@@ -261,7 +261,7 @@ invalid bids.
261261
/// still make the required deposit. The same address can
262262
/// place multiple bids.
263263
function bid(bytes32 _blindedBid)
264-
public
264+
external
265265
payable
266266
onlyBefore(biddingEnd)
267267
{
@@ -279,7 +279,7 @@ invalid bids.
279279
bool[] memory _fake,
280280
bytes32[] memory _secret
281281
)
282-
public
282+
external
283283
onlyAfter(biddingEnd)
284284
onlyBefore(revealEnd)
285285
{
@@ -311,7 +311,7 @@ invalid bids.
311311
}
312312
313313
/// Withdraw a bid that was overbid.
314-
function withdraw() public {
314+
function withdraw() external {
315315
uint amount = pendingReturns[msg.sender];
316316
if (amount > 0) {
317317
// It is important to set this to zero because the recipient
@@ -327,7 +327,7 @@ invalid bids.
327327
/// End the auction and send the highest bid
328328
/// to the beneficiary.
329329
function auctionEnd()
330-
public
330+
external
331331
onlyAfter(revealEnd)
332332
{
333333
if (ended) revert AuctionEndAlreadyCalled();

0 commit comments

Comments
 (0)