Conversation
Signed-off-by: petercover <raowanxiang@outlook.com>
📝 WalkthroughWalkthroughThis pull request encompasses a series of minor documentation and comment corrections across multiple files in the codebase. The changes primarily focus on fixing typographical errors, improving comment clarity, and making minor nomenclature adjustments without altering the underlying code functionality. The modifications span various components of the system, including RPC types, test files, and observer implementations. Changes
Possibly related PRs
Suggested Labels
Suggested Reviewers
✨ Finishing Touches
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
zetaclient/chains/evm/observer/v2_inbound.go (1)
Line range hint
449-472: Fix duplicate event appending in event validation.The event is being appended to the slice twice: once before validation and once after successful validation. This results in duplicate events in the slice.
Apply this fix to the event validation logic:
-events = append(events, iterator.Event) err := evm.ValidateEvmTxLog(&iterator.Event.Raw, gatewayAddr, "", evm.TopicsGatewayDepositAndCall) if err == nil { events = append(events, iterator.Event) continue }
🧹 Nitpick comments (1)
zetaclient/chains/evm/observer/v2_inbound.go (1)
Line range hint
449-472: Replace hardcoded gas limit with a constant.The gas limit is hardcoded to 1,500,000. Consider moving this value to a named constant for better maintainability and configurability.
+const DefaultDepositAndCallGasLimit = 1_500_000 + func (ob *Observer) newDepositAndCallInboundVote(event *gatewayevm.GatewayEVMDepositedAndCalled) types.MsgVoteInbound { // ... existing code ... - 1_500_000, + DefaultDepositAndCallGasLimit, // ... rest of the code ... }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
cmd/zetae2e/local/local.go(1 hunks)pkg/contracts/solana/gateway.go(1 hunks)pkg/mempool/custom_proposal_handler_test.go(2 hunks)rpc/namespaces/ethereum/eth/filters/filter_system.go(1 hunks)rpc/types/utils.go(1 hunks)x/lightclient/keeper/block_header_test.go(1 hunks)zetaclient/chains/evm/observer/v2_inbound.go(1 hunks)
✅ Files skipped from review due to trivial changes (5)
- pkg/contracts/solana/gateway.go
- pkg/mempool/custom_proposal_handler_test.go
- rpc/namespaces/ethereum/eth/filters/filter_system.go
- cmd/zetae2e/local/local.go
- x/lightclient/keeper/block_header_test.go
🧰 Additional context used
📓 Path-based instructions (2)
rpc/types/utils.go (1)
Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
zetaclient/chains/evm/observer/v2_inbound.go (1)
Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.
🔇 Additional comments (1)
rpc/types/utils.go (1)
Line range hint
187-249: Well-structured implementation with comprehensive transaction type handling.The function properly handles different transaction types (legacy, access list, and dynamic fee), with appropriate chain ID and signature management.
9fc89e0
Description
fix some comments
How Has This Been Tested?
Summary by CodeRabbit
Documentation
Refactor
newDepositInboundVotetonewDepositAndCallInboundVoteto better reflect its expanded functionalityChores