mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
updated public to external for the functions
changed public to external for the functions
This commit is contained in:
@@ -79,7 +79,7 @@ to receive their money - contracts cannot activate themselves.
|
||||
/// together with this transaction.
|
||||
/// The value will only be refunded if the
|
||||
/// auction is not won.
|
||||
function bid() public payable {
|
||||
function bid() external payable {
|
||||
// No arguments are necessary, all
|
||||
// information is already part of
|
||||
// the transaction. The keyword payable
|
||||
@@ -113,7 +113,7 @@ to receive their money - contracts cannot activate themselves.
|
||||
}
|
||||
|
||||
/// Withdraw a bid that was overbid.
|
||||
function withdraw() public returns (bool) {
|
||||
function withdraw() external returns (bool) {
|
||||
uint amount = pendingReturns[msg.sender];
|
||||
if (amount > 0) {
|
||||
// It is important to set this to zero because the recipient
|
||||
@@ -132,7 +132,7 @@ to receive their money - contracts cannot activate themselves.
|
||||
|
||||
/// End the auction and send the highest bid
|
||||
/// to the beneficiary.
|
||||
function auctionEnd() public {
|
||||
function auctionEnd() external {
|
||||
// It is a good guideline to structure functions that interact
|
||||
// with other contracts (i.e. they call functions or send Ether)
|
||||
// into three phases:
|
||||
@@ -261,7 +261,7 @@ invalid bids.
|
||||
/// still make the required deposit. The same address can
|
||||
/// place multiple bids.
|
||||
function bid(bytes32 _blindedBid)
|
||||
public
|
||||
external
|
||||
payable
|
||||
onlyBefore(biddingEnd)
|
||||
{
|
||||
@@ -275,11 +275,11 @@ invalid bids.
|
||||
/// correctly blinded invalid bids and for all bids except for
|
||||
/// the totally highest.
|
||||
function reveal(
|
||||
uint[] memory _values,
|
||||
bool[] memory _fake,
|
||||
bytes32[] memory _secret
|
||||
uint[] calldata _values,
|
||||
bool[] calldata _fake,
|
||||
bytes32[] calldata _secret
|
||||
)
|
||||
public
|
||||
external
|
||||
onlyAfter(biddingEnd)
|
||||
onlyBefore(revealEnd)
|
||||
{
|
||||
@@ -311,7 +311,7 @@ invalid bids.
|
||||
}
|
||||
|
||||
/// Withdraw a bid that was overbid.
|
||||
function withdraw() public {
|
||||
function withdraw() external {
|
||||
uint amount = pendingReturns[msg.sender];
|
||||
if (amount > 0) {
|
||||
// It is important to set this to zero because the recipient
|
||||
@@ -327,7 +327,7 @@ invalid bids.
|
||||
/// End the auction and send the highest bid
|
||||
/// to the beneficiary.
|
||||
function auctionEnd()
|
||||
public
|
||||
external
|
||||
onlyAfter(revealEnd)
|
||||
{
|
||||
if (ended) revert AuctionEndAlreadyCalled();
|
||||
|
||||
Reference in New Issue
Block a user