Fixing the calldata
Specifier in the mintToPOLFeeCollector
Function
#329
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
An error was found and fixed in the project documentation pool.md regarding the declaration of the
mintToPOLFeeCollector
function. The original function declaration is as follows:function mintToPOLFeeCollector(address[] assets) external virtual
The
calldata
data location specifier needs to be added for theassets
parameter. The corrected function declaration should be:function mintToPOLFeeCollector(address[] calldata assets) external virtual
In Solidity, starting from version 0.5.0, it is mandatory to specify the data location (
memory
,storage
, orcalldata
) for parameters of array and struct types in external functions. For external functions, it is recommended to use calldata for immutable data as it optimizes gas usage and enhances data processing efficiency.Omitting the
calldata
specifier for theassets
parameter in themintToPOLFeeCollector
function leads to a compilation error. Therefore, addingcalldata
is necessary to ensure correct compilation and optimal gas usage.The proposed change ensures that the
mintToPOLFeeCollector
function compiles correctly and optimizes gas usage during data processing. It is recommended to merge this pull request to rectify the documentation error.Does it close a specific issue?
Example:
Closes #328
Contribution
I have followed the Development Workflow
I have read the CODE OF CONDUCT
I HAVE MADE SURE TO ALLOW MAINTAINERS TO EDIT THIS PULL REQUEST
I have synced my fork so that it is up to date with the latest changes
Let us know your wallet address/ENS: