Skip to content

use structs in testhelper to reduce stack size #92

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

DanL0
Copy link

@DanL0 DanL0 commented Jul 3, 2024

fixes #42

cd packages/layerzero-v2/evm/oapp
forge coverage --ir-minimum

@DanL0 DanL0 requested a review from carmenjiawenc July 3, 2024 12:50
@@ -64,121 +64,127 @@ contract TestHelper is Test, OptionsHelper {
executorValueCap = _valueCap;
}

struct EndpointSetup {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth to add natspec comment?
/**

  • @dev Structure to manage and store endpoint-related configurations.
  • Used for setting up multiple endpoints in testing and deployment.
  • @param endpointList Array of deployed endpoint contracts.
  • @param eidList List of endpoint identifiers (EIDs).
  • @param sendLibs Addresses of sending libraries for each endpoint.
  • @param receiveLibs Addresses of receiving libraries for each endpoint.
  • @param signers List of signer addresses for verification.
  • @param priceFeed Reference to the deployed price feed contract.
    */

PriceFeed priceFeed;
}

struct LibrarySetup {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

natspec comment

}

EndpointSetup endpointSetup;

/**
* @dev setup the endpoints
* @param _endpointNum num of endpoints
*/
function setUpEndpoints(uint8 _endpointNum, LibraryType _libraryType) public {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/**

  • @dev Deploys and configures multiple endpoints for cross-chain messaging.
  • Initializes endpoint contracts, registers libraries, and configures price feeds.
  • @param _endpointNum Number of endpoints to deploy.
  • @param _libraryType Type of message library to use (UltraLightNode or SimpleMessageLib).
    */

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.

forge coverage fails to run on OApp
3 participants