Closed henrio123 closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
sommelier-web | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 18, 2024 10:08am |
This update introduces new functionalities related to handling Merkle tree proofs in a smart contract, adds a component to display Merkle points, streamlines existing code, and extends the application to support APY calculations for Merkle rewards. It includes updates to multiple files, ranging from contract ABI definitions to React components and utility functions, ensuring smoother integration of Merkle tree proofs into the user interface and backend operations.
File(s) | Summary |
---|---|
src/abi/merkle.json |
Defines functions/events for handling claiming, verifying merkle tree proofs, and ownership |
src/components/CellarStatsYield.tsx |
Introduced merkleRewardsApy variable for APY calculations |
src/components/_cards/PortfolioCard/MerklePoints/MerklePoints.tsx |
Added MerklePoints component and supporting functions |
src/components/_cards/PortfolioCard/Rewards.tsx |
Enhanced claimAllDisabled logic for clarity |
src/components/_cards/PortfolioCard/index.tsx |
Added MerklePoints and BaseButton imports, conditional rendering for MerklePoints |
src/components/_columns/StrategyDesktopColumn.tsx |
Added merkleRewardsApy prop |
src/components/_columns/StrategyTabColumn.tsx |
Added merkleRewardsApy prop |
src/components/_tables/ApyRewardsSection.tsx |
Included merkleRewardsApy in component props |
src/data/actions/common/getMerkleRewardsApy.ts |
New functions for calculating Merkle rewards APY and fetching total staked value |
src/data/tokenConfig.ts |
Added new token configuration for Arbitrum (ARB) |
src/utils/fetchMerkleData.ts |
Introduced function fetchMerkleData to get Merkle data from an API |
sequenceDiagram
participant User
participant Frontend
participant Backend
participant MerkleContract
User ->> Frontend: Access Portfolio Page
Frontend ->> Backend: Request Merkle Points
Backend ->> MerkleContract: Verify and Get Merkle Points
MerkleContract -->> Backend: Return Merkle Points
Backend -->> Frontend: Send Merkle Points
Frontend -->> User: Display Merkle Points
User ->> Frontend: Click Claim Rewards
Frontend ->> Backend: Request to Claim Rewards
Backend ->> MerkleContract: Process Claim
MerkleContract -->> Backend: Confirm Claim
Backend -->> Frontend: Update UI on Success
Frontend -->> User: Display Success Message
In code's deep woods, where Merkle trees gleam,
Rewards abound, a coder's dream. 🌿
With ethers and proofs, they all align,
APY soars, rewards divine.
Arbitrum joins, a token anew,
For a smoother journey in the code forest, through and through. ✨🛤️
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?
merkle rewards contract: https://arbiscan.io/address/0x6D6444b54FEe95E3C7b15C69EfDE0f0EB3611445
The SOMM API now has a new endpoint: https://api.sommelier.finance/merkle/arbitrum/0x1222f0baA62e2282Bfd01083C7C3732A8c611584
Summary by CodeRabbit
New Features
Improvements
claimAllDisabled
logic in theRewards
component.Bug Fixes
PortfolioCard
component.New Utilities