aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/big.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/big.go b/common/big.go
index dcc5269a7..ea3d4aba6 100644
--- a/common/big.go
+++ b/common/big.go
@@ -63,3 +63,9 @@ func (b Big) Value() (driver.Value, error) {
b2 := big.Int(b)
return (&b2).String(), nil
}
+
+// String returns decimal value in string type.
+func (b *Big) String() string { return (*big.Int)(b).String() }
+
+// BigInt convert common.Big to big.Int.
+func (b *Big) BigInt() *big.Int { return (*big.Int)(b) }