Add Generic USD on Citrea#794
Conversation
|
Warning Review limit reached
More reviews will be available in 10 minutes and 44 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Generic USD (GUSD) as a new pegged asset by creating an adapter module that configures the citrea.issued contract and registering the asset metadata entry in the system's pegged-asset catalog with complete configuration fields. ChangesGeneric USD Pegged Asset
Possibly Related PRs
Estimated Code Review Effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/peggedData/peggedData.ts`:
- Line 8113: Update the token entry that sets address:
"0xac8c1aeb584765db16ac3e08d4736cfce198589b" to a chain-qualified address by
prefixing it with "citrea:" (i.e.,
"citrea:0xac8c1aeb584765db16ac3e08d4736cfce198589b") so downstream consumers
won't misclassify the token as an Ethereum asset; locate the token's object in
src/peggedData/peggedData.ts (the entry with address field shown) and replace
the bare EVM address string with the "citrea:"-prefixed string.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 38fb0900-246e-4fdd-abd2-d9ea2cd8e4b3
📒 Files selected for processing (2)
src/adapters/peggedAssets/generic-usd/index.tssrc/peggedData/peggedData.ts
|
@muhylmz what is backing GUSD? Also is it issued on Ethereum and then bridged to Citrea? |
Adds Generic USD (GUSD) issuance on Citrea.
0xac8c1aeb584765db16ac3e08d4736cfce198589bTested with:
npx ts-node --transpile-only test.ts generic-usd peggedUSDCurrent live circulating supply returned by the adapter is about 412.96k GUSD.
Summary by CodeRabbit