aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/math/big.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/math/big.go b/common/math/big.go
index 0b67a1b50..5255a88e9 100644
--- a/common/math/big.go
+++ b/common/math/big.go
@@ -51,6 +51,9 @@ func (i *HexOrDecimal256) UnmarshalText(input []byte) error {
// MarshalText implements encoding.TextMarshaler.
func (i *HexOrDecimal256) MarshalText() ([]byte, error) {
+ if i == nil {
+ return []byte("0x0"), nil
+ }
return []byte(fmt.Sprintf("%#x", (*big.Int)(i))), nil
}