Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

The contract doesn't follow Solidity guidelines

Recommendations

Order of Functions; ordering helps readers identify which functions they can call and to find the constructor and fallback definitions easier. But there are contracts in the project that do not comply with this.

https://docs.soliditylang.org/en/v0.7.6/style-guide.html

Functions should be grouped according to their visibility and ordered:

constructor

receive function (if exists)

fallback function (if exists)

external

public

internal

private

within a grouping, place the view and pure functions last

Having this in mind the order of the functions should be the following:

// This is not meant to be the real contract, this is pseudo code
contract PuppyRaffle {
constructor();
// external functions
function getActivePlayerIndex() external view;
function withdrawFees() external;
function selectWinner() external;
function changeFeeAddress() external;
// public functions
function tokenURI() public view;
function enterRaffle() public;
function refund() public
// internal functions
function _isActivePlayer() internal view;
function _baseURI() internal pure;
}
Updates

Lead Judging Commences

patrickalphac Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!