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

Reenable livenet tests #377

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Reenable livenet tests #377

merged 2 commits into from
Mar 5, 2024

Conversation

kubaplas
Copy link
Contributor

@kubaplas kubaplas commented Mar 4, 2024

Summary by CodeRabbit

  • New Features
    • Added a new step in the CI/CD workflow to run livenet tests.
    • Introduced an example demonstrating contract deployment and interaction on the Livenet environment.
  • Documentation
    • Updated documentation for ERC20 contract functions in examples.
  • Chores
    • Enhanced the release process with an additional command to publish the odra-build package.

Copy link
Contributor

coderabbitai bot commented Mar 4, 2024

Walkthrough

These updates enhance a project focused on smart contract interactions on a live blockchain network. A new testing step is added to the CI/CD pipeline for live network testing. Parameter handling in ERC20 contract interactions is optimized for efficiency by using references. The release script is updated to streamline package publishing, ensuring the correct order for odra packages.

Changes

File(s) Change Summary
.github/workflows/test.yml Added a new service casper-nctl with specific configurations and ports in the workflow. Included a step to run livenet tests using the command just test-livenet.
examples/bin/erc20_on_livenet.rs
examples/bin/livenet_tests.rs
Updated transfer and balance_of function calls to pass references to parameters; added comments for contract operations.
release-odra.sh Added a cargo publish -p odra-build command before publishing packages for odra-core, odra-macros, and odra-vm.

🐰✨
To the blockchain, we hop and play,
With smarter contracts, we pave the way.
In the land of code, where tests light the night,
Our changes swift, our code takes flight.
Through livenet's realm, with care we tread,
With every line, our future's fed. 🌟
🐰💻

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-tests 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 tests 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 tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@kubaplas kubaplas changed the base branch from release/0.8.1 to release/0.8.2 March 4, 2024 15:33
Copy link
Contributor

@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.

Review Status

Actionable comments generated: 3

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6e9fb7a and 128c82a.
Files selected for processing (4)
  • .github/workflows/test.yml (1 hunks)
  • examples/bin/erc20_on_livenet.rs (2 hunks)
  • examples/bin/livenet_tests.rs (4 hunks)
  • release-odra.sh (1 hunks)
Additional comments: 5
examples/bin/erc20_on_livenet.rs (2)
  • 25-25: The update to pass references in the token.transfer function call aligns with Rust's best practices for efficient memory usage. This change improves the code's performance by avoiding unnecessary data copying.
  • 27-28: The updates to pass references in the token.balance_of function calls are correctly implemented and enhance the code's efficiency. Good job on adhering to Rust's best practices.
examples/bin/livenet_tests.rs (3)
  • 1-1: The addition of a description at the beginning of the file is a great practice. It provides valuable context and helps developers understand the purpose and functionality of the example. Ensure the description is clear, concise, and accurately reflects the example's objectives.
  • 47-49: The updates to pass references in the erc20.balance_of function calls are correctly implemented and contribute to the code's efficiency by avoiding unnecessary data copying. This is a good application of Rust's best practices.
  • 66-66: The update to pass a reference in the erc20_contract.transfer function call is correctly implemented. This change enhances the code's performance by adhering to Rust's best practices for efficient memory usage.

release-odra.sh Show resolved Hide resolved
.github/workflows/test.yml Show resolved Hide resolved
examples/bin/erc20_on_livenet.rs Show resolved Hide resolved
@kubaplas kubaplas force-pushed the bugfix/livenet-on-0.8.1 branch from 128c82a to 5044e98 Compare March 4, 2024 15:40
Copy link
Contributor

@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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6e9fb7a and 5044e98.
Files selected for processing (4)
  • .github/workflows/test.yml (2 hunks)
  • examples/bin/erc20_on_livenet.rs (2 hunks)
  • examples/bin/livenet_tests.rs (4 hunks)
  • release-odra.sh (1 hunks)
Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/test.yml
  • examples/bin/erc20_on_livenet.rs
  • examples/bin/livenet_tests.rs
  • release-odra.sh

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (release/0.8.2@6b0b1f5). Click here to learn what that means.

Additional details and impacted files
@@               Coverage Diff                @@
##             release/0.8.2     #377   +/-   ##
================================================
  Coverage                 ?   85.01%           
================================================
  Files                    ?      124           
  Lines                    ?    13619           
  Branches                 ?        0           
================================================
  Hits                     ?    11578           
  Misses                   ?     2041           
  Partials                 ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kubaplas kubaplas force-pushed the bugfix/livenet-on-0.8.1 branch from 5044e98 to 593da8e Compare March 5, 2024 10:46
Copy link
Contributor

@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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6b0b1f5 and 593da8e.
Files selected for processing (4)
  • .github/workflows/test.yml (2 hunks)
  • examples/bin/erc20_on_livenet.rs (2 hunks)
  • examples/bin/livenet_tests.rs (4 hunks)
  • release-odra.sh (1 hunks)
Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/test.yml
  • examples/bin/erc20_on_livenet.rs
  • examples/bin/livenet_tests.rs
  • release-odra.sh

Reenabled livenet tests.
@kubaplas kubaplas force-pushed the bugfix/livenet-on-0.8.1 branch from 593da8e to fc598fb Compare March 5, 2024 14:15
Copy link
Contributor

@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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6b0b1f5 and fc598fb.
Files selected for processing (4)
  • .github/workflows/test.yml (2 hunks)
  • examples/bin/erc20_on_livenet.rs (2 hunks)
  • examples/bin/livenet_tests.rs (4 hunks)
  • release-odra.sh (1 hunks)
Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/test.yml
  • examples/bin/erc20_on_livenet.rs
  • examples/bin/livenet_tests.rs
  • release-odra.sh

@kubaplas kubaplas merged commit 4903b73 into release/0.8.2 Mar 5, 2024
6 checks passed
@zie1ony zie1ony deleted the bugfix/livenet-on-0.8.1 branch March 5, 2024 23:19
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