fix: Safe deployment gas estimation on Arbitrum#219
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ee60245 to
e9dbbc2
Compare
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
Disabled knowledge base sources:
📝 WalkthroughWalkthroughChanges introduce stablecoin detection to conditionally render price-change indicators, enhance Safe transaction execution with a composite provider pattern for read/write routing, remove loading state from asset metrics, implement persistent storage with IDB-to-localStorage fallback recovery, and add browser storage persistence requests during app bootstrap. Changes
Sequence DiagramssequenceDiagram
participant App
participant CompositeProvider as Composite Provider
participant PublicClient as Public Client (RPC)
participant WalletProvider as Wallet Provider
participant SafeKit as Safe.init()
App->>CompositeProvider: createSafeProvider(chainId, provider)
CompositeProvider->>SafeKit: Pass composite provider
Note over App,SafeKit: Execution phase
App->>CompositeProvider: request(read-only method)
CompositeProvider->>PublicClient: Forward eth_call, eth_getCode, etc.
PublicClient-->>CompositeProvider: Response
CompositeProvider-->>App: Return result
App->>CompositeProvider: request(other method)
CompositeProvider->>WalletProvider: Forward transaction/write
WalletProvider-->>CompositeProvider: Response
CompositeProvider-->>App: Return result
sequenceDiagram
participant Store as Chat Store
participant IDB as IndexedDB
participant LocalStorage as localStorage
participant Hydration as Rehydrate Callback
Store->>IDB: Read conversations on init
alt IDB Read Success
IDB-->>Store: Conversations loaded
alt Conversations empty
Store->>LocalStorage: Read backup
LocalStorage-->>Store: Fallback data
Store->>Store: Validate & assign backup
else Conversations present
Store->>Store: Use IDB data
end
else IDB Read Fails
IDB-->>Store: Error logged
Store->>LocalStorage: Attempt localStorage recovery
LocalStorage-->>Store: Backup data
Store->>Store: Validate & assign backup
end
Store->>Hydration: Mark hydrationVerified = true
Hydration->>IDB: Enable subsequent writes
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Safe deployments on Arbitrum revert with out-of-gas because the SDK's createSafeDeploymentTransaction() returns no gas fields and wallet estimation underestimates. Add estimateGas() + 20% buffer before sendTransaction, matching the existing pattern in simulation.ts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WalletConnect wallets (e.g. ShapeShift native) don't properly relay read-only RPC calls like eth_call and eth_getCode, causing Safe SDK init to fail with "Missing or invalid parameters. Failed to fetch Version". Creates a composite provider that routes reads through a public RPC (with viem fallback transport for resilience) while keeping write/sign operations on the wallet provider. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6049965 to
05df5cf
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…licate RPC transports Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
estimateGas()+ 20% buffer before sending Safe deployment transactionssimulation.tsfor EOA transactionsTest plan
bun run type-checkandbun testpass🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Improvements