File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
- // Copyright © 2021 - 2023 Attestant Limited.
1
+ // Copyright © 2021 - 2024 Attestant Limited.
2
2
// Licensed under the Apache License, Version 2.0 (the "License");
3
3
// you may not use this file except in compliance with the License.
4
4
// You may obtain a copy of the License at
@@ -28,6 +28,13 @@ const AddressLength = 20
28
28
// Address is a 20-byte execution layer address.
29
29
type Address [AddressLength ]byte
30
30
31
+ var emptyAddress = Address {}
32
+
33
+ // IsZero returns true if the address is zero.
34
+ func (a Address ) IsZero () bool {
35
+ return bytes .Equal (a [:], emptyAddress [:])
36
+ }
37
+
31
38
// String returns the EIP-55 string representation of the address.
32
39
func (a Address ) String () string {
33
40
data := []byte (hex .EncodeToString (a [:]))
You can’t perform that action at this time.
0 commit comments