Solidity Visibility and Modifiers Cheat Sheet
DevTools StoreSolidity Visibility + Modifiers
Visibility
public Any contract or EOA external Only from outside (cheaper) internal This + child contracts private Only this contract
State Mutability
view Reads state only pure No state read or write payable Can receive ETH
Custom Modifier
modifier onlyOwner() {
require(msg.sender == owner);
_; // function body runs here
}
function mint() external onlyOwner { }All cheat sheets: https://rentry.co/85pm7d8y