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

Feat/token naming #794

Merged
merged 3 commits into from
Mar 10, 2024
Merged

Conversation

dapp-whisperer
Copy link
Contributor

@dapp-whisperer dapp-whisperer commented Mar 10, 2024

Summary by CodeRabbit

  • New Features
    • Introduced a new function to calculate the real stake in contracts.
    • Added a new event CdpUpdated to provide updates on contract actions.
    • Renamed "EBTC Stablecoin" to "eBTC" for clarity and branding.
    • Enhanced contract interfaces with additional functions for improved data management.
    • Implemented new testing functions and invariants to ensure contract integrity and correct stake updates.
  • Bug Fixes
    • Adjusted function signatures and logic for better redemption handling.
  • Refactor
    • Updated internal logic and variables in test contracts for more accurate testing scenarios.
  • Chores
    • Updated project dependencies and remappings for better maintainability.

Copy link
Contributor

coderabbitai bot commented Mar 10, 2024

Walkthrough

This series of updates introduces enhancements and new functionalities across various contracts within a project, focusing on stake calculations, snapshots, and the optimization of the eBTC token. Notably, it adds new functions and events, modifies existing ones for efficiency, and ensures thorough testing and documentation of changes. The adjustments aim to improve the system's robustness and user experience while maintaining compatibility and feature parity with previous versions.

Changes

Files Change Summary
.../CRLens.sol
.../CdpManager.sol
.../EBTCToken.sol
.../Interfaces/ICdpManagerData.sol
.../TestContracts/invariants/BeforeAfter.sol
.../TestContracts/invariants/Properties.sol
.../TestContracts/invariants/PropertiesDescriptions.sol
.../TestContracts/invariants/TargetFunctions.sol
.../TestContracts/invariants/echidna/EchidnaProperties.sol
.../foundry_test/CDPManager.redemptions.t.sol
.../foundry_test/EchidnaToFoundry.t.sol
.../remappings.txt
- New functionalities for stake calculations and snapshots.
- Event and constant modifications for improved clarity and efficiency.
- Enhanced testing for stake updates and partial redemption scenarios.
- Adjustments in remappings for better project structure.

Related issues

  • Remake eBTC token using solmate #536: The changes made in the EBTCToken.sol contract, specifically the renaming and potential optimizations, could be part of ensuring compatibility and maintaining feature parity with existing functionalities, aligning with the objective to remake the eBTC token using the Solmate framework.
  • eBTC token optimization #527: Optimizations in contracts, especially in EBTCToken.sol, and the introduction of new testing protocols could address objectives related to improving efficiency, performance, and gas efficiency of the eBTC token.

Poem

In the world of code, where the smart contracts hop,

A bunny worked hard in the blockchain shop.

🐰 With a tweak and a fix, making eBTC shine,

Ensuring stakes and snapshots align.

Through tests and changes, it hopped with glee,

"For a better blockchain world," said CodeRabbit, with tea. 🍵

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.

@dapp-whisperer dapp-whisperer changed the base branch from release-0.8 to feat/fixPartialRedempStake March 10, 2024 17:19
@getrecon-bot
Copy link

Job ID 40f67fee-64b6-4e7c-841e-43e17329d83b
Command yarn && git submodule init && git submodule update && solc-select use 0.8.17 && cd packages/contracts/ && yarn echidna --test-mode assertion --test-limit 300000
Instance ID i-085b23abaac44ea35
Instance Type c5.2xlarge
Status Started
Elapsed

@getrecon-bot
Copy link

Job ID 40f67fee-64b6-4e7c-841e-43e17329d83b
Command yarn && git submodule init && git submodule update && solc-select use 0.8.17 && cd packages/contracts/ && yarn echidna --test-mode assertion --test-limit 300000
Instance ID i-085b23abaac44ea35
Instance Type c5.2xlarge
Status Running
Elapsed 43 seconds

@getrecon-bot
Copy link

Job ID 40f67fee-64b6-4e7c-841e-43e17329d83b
Command yarn && git submodule init && git submodule update && solc-select use 0.8.17 && cd packages/contracts/ && yarn echidna --test-mode assertion --test-limit 300000
Instance ID i-085b23abaac44ea35
Instance Type c5.2xlarge
Status Running
Elapsed 44 seconds

Comment on lines 1840 to 1846
115792089237316195423570985007720775198317476882341396735424792728422849019608,
false,
true,
false,
45293226562680564985708122691552976547680258329418575378480455888078590502957,
73848382371233259027908259540810899867775610968899633645073264036267903406851
);
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [663-663]

Hardcoding sensitive credentials like AWS Access Key IDs directly in the code is a significant security risk. It's recommended to use environment variables or a separate, private file to store such credentials securely.


📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [694-694]

Hardcoding sensitive credentials like AWS Access Key IDs directly in the code is a significant security risk. It's recommended to use environment variables or a separate, private file to store such credentials securely.


📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [724-724]

Hardcoding sensitive credentials like AWS Access Key IDs directly in the code is a significant security risk. It's recommended to use environment variables or a separate, private file to store such credentials securely.


📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [942-942]

Hardcoding sensitive credentials like AWS Access Key IDs directly in the code is a significant security risk. It's recommended to use environment variables or a separate, private file to store such credentials securely.

@dapp-whisperer dapp-whisperer merged commit 5477d47 into feat/fixPartialRedempStake Mar 10, 2024
5 checks passed
@getrecon-bot
Copy link

Job ID 40f67fee-64b6-4e7c-841e-43e17329d83b
Command yarn && git submodule init && git submodule update && solc-select use 0.8.17 && cd packages/contracts/ && yarn echidna --test-mode assertion --test-limit 300000
Instance ID i-085b23abaac44ea35
Instance Type c5.2xlarge
Status Error
Elapsed 17 hours 28 minutes 52 seconds

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