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

fix: Deposits #1

Merged
merged 3 commits into from
Jan 14, 2025
Merged

fix: Deposits #1

merged 3 commits into from
Jan 14, 2025

Conversation

shekohex
Copy link
Contributor

This pull request includes several important updates to the development environment, CI workflow, Solidity contracts, and test calculations. The most significant changes include the addition of a Nix flake file, updates to the GitHub Actions workflow, and modifications to the Solidity contract and its associated tests.

CI Workflow:

  • Updated .github/workflows/test.yml to include branch-specific triggers, concurrency control, and an additional job for generating a coverage report. [1] [2]

Solidity Contracts:

  • Modified foundry.toml to specify the Solidity compiler version and optimizer settings.
  • Updated src/TangleLiquidRestakingVault.sol to include a new import statement and refactored the addRewardToken and deposit functions for better readability and functionality. [1] [2] [3]

Test Calculations:

  • Refactored reward calculations in test/TangleLiquidRestakingVault.t.sol for clarity and correctness. [1] [2]

@shekohex shekohex requested review from drewstone and Copilot January 14, 2025 22:10

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 8 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • .envrc: Language not supported
  • flake.nix: Language not supported
  • src/TangleLiquidRestakingVault.sol: Language not supported
  • test/TangleLiquidRestakingVault.t.sol: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/test.yml:41

  • [nitpick] The 'forge soldeer update -d' command is used twice in the workflow. Consider optimizing to avoid redundancy.
run: forge soldeer update -d
Copy link

LCOV of commit f63bab9 during CI #11

Summary coverage rate:
  lines......: 81.4% (210 of 258 lines)
  functions..: 65.5% (38 of 58 functions)
  branches...: 68.4% (13 of 19 branches)

Files changed coverage rate:
                                           |Lines       |Functions  |Branches    
  Filename                                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================================
  src/TangleLiquidRestakingVault.sol       |18.5%    135| 100%    19|    -      0

shekohex added a commit to tangle-network/tangle that referenced this pull request Jan 14, 2025
@drewstone drewstone merged commit b0bc6fa into main Jan 14, 2025
2 checks passed
@shekohex shekohex deleted the shady/fixes branch January 14, 2025 23:59
drewstone pushed a commit to tangle-network/tangle that referenced this pull request Jan 21, 2025
* feat: LRTs

* fix: Update precompiles bytecode to get around the EVM checks

As precompiles are implemented inside the Runtime, they don't have a bytecode, and
their account code is empty by default. However in Solidity calling a function of a
contract often automatically adds a check that the contract bytecode is non-empty.
For that reason a dummy code (0x60006000fd) can be inserted at the precompile address
to pass that check.

* fix: LRT deposit workflow

Related to: tangle-network/lrt#1

* chore: Expose the precompiles as type alias

* fix: Update LRT Test

* feat: LRT withdraw works

* chore: fix clippy

* Discard changes to precompiles/multi-asset-delegation/src/lib.rs

* Discard changes to runtime/testnet/src/precompiles.rs

* feat: add LRT rewards test

* chore: debugging the issue with unstaking

* feat: add balanceOf calls to the precompile

* fix: make balanceOf view calls

* chore: remove logging

* fix: update tests
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