Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/prototyp/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ func (h Hash) IsEmpty() bool {
func (h Hash) IsNativeTokenAddress() bool {
return h == "0x0000000000000000000000000000000000000000" ||
h == "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" ||
h == "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
h == "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" ||
h == "0x0000000000000000000000000000000000001010"
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is inconsistent with the rest of the function. The previous lines use a single tab character for indentation, but this line uses spaces. Change the leading whitespace to use a single tab character to match lines 144-146.

Suggested change
h == "0x0000000000000000000000000000000000001010"
h == "0x0000000000000000000000000000000000001010"

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new Polygon native token address check lacks test coverage. The lib/prototyp package has comprehensive test coverage for other functions (e.g., bigint_test.go has 242 lines, hash_test.go exists with tests for other Hash methods), but IsNativeTokenAddress has no tests. Add test cases that verify all four native token addresses are correctly recognized, including the newly added Polygon address 0x0000000000000000000000000000000000001010.

Copilot uses AI. Check for mistakes.
}

func (h Hash) IsValidHex() bool {
Expand Down
Loading