refactor: extract gas buffer helpers into public custody functions#26
refactor: extract gas buffer helpers into public custody functions#26maxpushka wants to merge 1 commit intolayer-3:masterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new GasBuffer utility is introduced in the custody package with constants and functions for gas buffering Ethereum transactions. The service package is refactored to use these new custody utilities instead of maintaining its own gas buffering logic. Changes
Sequence DiagramsequenceDiagram
actor Caller
participant Service as Service
participant Custody as Custody Package
participant Contract as IWithdraw Contract
participant EthBackend as Ethereum Backend
Caller->>Service: Call withdraw operation
Service->>Custody: Call buffered operation
Custody->>Contract: Dry-run transaction (estimate gas)
Contract->>EthBackend: Execute dry-run
EthBackend-->>Contract: Gas estimation result
Contract-->>Custody: Gas estimate returned
Custody->>EthBackend: Fetch suggested gas price
EthBackend-->>Custody: Gas price + apply buffers
Custody->>Contract: Execute actual operation<br/>(with buffered gas limit & price)
Contract->>EthBackend: Submit transaction
EthBackend-->>Contract: Transaction confirmation
Contract-->>Custody: Transaction result
Custody-->>Service: Return transaction
Service-->>Caller: Return result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
Summary by CodeRabbit
New Features
Refactor