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

chore: add help target to Makefile to display the usage of all targets #125

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

caseylove
Copy link
Contributor

@caseylove caseylove commented Jul 14, 2024

Similar to near/nearcore pulls#11784

The help target will be helpful for new developers begin to contribute for this project.

image


This change is Reviewable

Summary by CodeRabbit

  • Chores
    • Improved Makefile with new targets for formatting, updating submodules, building and testing contracts, deploying contracts to NEAR testnet, building Docker images, and managing the da-rpc library.
    • Enhanced Makefile to handle CDK images and nodes, execute ERC20 transfers, and provide a help command.

@caseylove caseylove requested a review from dndll as a code owner July 14, 2024 09:34
Copy link

coderabbitai bot commented Jul 14, 2024

Walkthrough

The Makefile has been significantly enhanced to streamline various development, testing, and deployment processes. This includes adding new targets for formatting code, updating submodules, building and testing smart contracts, deploying these contracts to the NEAR testnet, and managing Docker images for different components. Additionally, there are new targets for executing ERC20 transfers and a help command to provide users with information on available commands.

Changes

File Change Summary
Makefile Added targets for formatting, submodule updates, building/testing contracts, deploying to NEAR testnet, Docker image management, CDK operations, ERC20 transfers, and a help command.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant Makefile
    participant NEAR Testnet
    participant Docker
    participant CDK Node

    Developer->>Makefile: run build-contracts
    Makefile->>Makefile: Create blob store contract
    Developer->>Makefile: run test-contracts
    Makefile->>Makefile: Create blob store contract and run tests
    Developer->>Makefile: run deploy-contracts
    Makefile->>NEAR Testnet: Deploy near-da-blob-store contract
    Developer->>Makefile: run da-rpc-docker
    Makefile->>Docker: Build Docker image for da-rpc
    Developer->>Makefile: run cdk-devnet-up
    Makefile->>CDK Node: Start cdk-validium-node development network
Loading

Poem

In the code, a new dawn breaks,
Contracts build and test in wakes,
Docker hums a tune so clear,
NEAR deployments drawing near.
CDK nodes rise and fall,
ERC transfers answer call,
Help commands, a guiding light,
In Makefile’s realm, all is right.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 133aa4e and 9d3e45d.

Files selected for processing (1)
  • Makefile (2 hunks)
Additional comments not posted (14)
Makefile (14)

4-6: LGTM!

The format target correctly formats the code using taplo and cargo fmt.


9-11: LGTM!

The submodules target correctly updates submodules.


18-20: LGTM!

The build-contracts target correctly builds the near-da-blob-store contract.


22-24: LGTM!

The test-contracts target correctly builds the near-da-blob-store contract and runs tests.


27-29: LGTM!

The deploy-contracts target correctly deploys the near-da-blob-store contract to the NEAR testnet.


35-37: LGTM!

The da-rpc-docker target correctly builds the Docker image.


40-45: LGTM!

The da-rpc-sys-unix target correctly copies the compiled da-rpc library from the Docker image to the local filesystem.


48-54: LGTM!

The cdk-images target correctly pulls and tags the cdk-validium-contracts and cdk-validium-node Docker images.


56-58: LGTM!

The cdk-devnet-up target correctly starts the cdk-validium-node development network and explorer.


61-63: LGTM!

The cdk-devnet-down target correctly stops the cdk-validium-node development network.


66-68: LGTM!

The cdk-node target correctly builds the cdk-validium-node.


71-73: LGTM!

The send-cdk-transfers target correctly runs the ERC20 transfers script.


76-78: LGTM!

The cdk-devnet-redeploy-test target correctly builds and starts the cdk-validium-node development network, then tests the ERC20 transfers script.


80-84: LGTM!

The help target correctly displays the help message.

@dndll dndll merged commit 0cf8fc6 into Nuffle-Labs:main Jul 15, 2024
2 of 3 checks passed
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.

2 participants