Conversation
There was a problem hiding this comment.
Pull request overview
This PR modifies the CrossChainAddress validation logic to allow empty addresses. Previously, empty cross-chain addresses were explicitly rejected; now they are permitted.
Changes:
- Removed the validation check that prevented empty cross-chain addresses
- Updated the corresponding test case to reflect that empty addresses are now valid
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/ccip/bindings/common/common.go | Removed the empty address validation check in the ToCell() method |
| pkg/ccip/bindings/common/common_test.go | Updated test expectation for empty addresses from error to success |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| builder := cell.BeginCell() | ||
| err := builder.StoreSlice([]byte{uint8(addrLength)}, 8) // store the first byte as length |
There was a problem hiding this comment.
When addrLength is 0 (empty address), this will store a zero-length byte, but the subsequent StoreSlice(c, addrLength*8) call on the next line will attempt to store 0 bits. Verify that the cell builder correctly handles storing an empty slice and that downstream consumers can properly interpret a cross-chain address with length 0.
No description provided.