Skip to content

Public view vs external&internal view #186

@Quazia

Description

@Quazia

There's a few places we use a public view where we could have an internal view that's accessible by way of another external view.

For example:

    function getNftQuestFee(address address_) public view returns (uint256) {
        return nftQuestFeeList[address_].exists ? nftQuestFeeList[address_].fee : nftQuestFee;
    }

Would become:

    function getNftQuestFee(address address_) external view returns (uint256) {
        _getNftQuestFee(address_);
    }
     
     function _getNftQuestFee(address address_) internal view returns (uint256) {
        return nftQuestFeeList[address_].exists ? nftQuestFeeList[address_].fee : nftQuestFee;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementchanges that improve the security, or performance of the code without modifying the functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions