Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the calldata Specifier in the mintToPOLFeeCollector Function #329

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EricNorberg
Copy link

@EricNorberg EricNorberg commented Nov 6, 2024

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 the assets 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, or calldata) 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 the assets parameter in the mintToPOLFeeCollector function leads to a compilation error. Therefore, adding calldata 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
    Allow Maintainers to Edit

  • I have synced my fork so that it is up to date with the latest changes
    Synced Fork With Remote Upstream

Let us know your wallet address/ENS:

0x1151f6bfa5f5edc744c522581127d3bb381bde4b

Copy link

vercel bot commented Nov 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
berachain-docs-bex ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2024 2:49pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fixing the calldata Specifier in the mintToPOLFeeCollector Function
1 participant