aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/value.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-22 20:50:53 +0800
committerobscuren <geffobscura@gmail.com>2014-09-22 20:50:53 +0800
commit151f9c7f8214a2702a76f36f566b52266949ac89 (patch)
tree502479580b1bf3261997cb76aa9f7f071965a907 /ethutil/value.go
parent80261c803a82e51413608a3dc5273c982844d135 (diff)
downloaddexon-151f9c7f8214a2702a76f36f566b52266949ac89.tar.gz
dexon-151f9c7f8214a2702a76f36f566b52266949ac89.tar.zst
dexon-151f9c7f8214a2702a76f36f566b52266949ac89.zip
BigInt accept string
Diffstat (limited to 'ethutil/value.go')
-rw-r--r--ethutil/value.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/ethutil/value.go b/ethutil/value.go
index e8148b990..b1f887f29 100644
--- a/ethutil/value.go
+++ b/ethutil/value.go
@@ -118,6 +118,8 @@ func (val *Value) BigInt() *big.Int {
return b
} else if a, ok := val.Val.(*big.Int); ok {
return a
+ } else if a, ok := val.Val.(string); ok {
+ return Big(a)
} else {
return big.NewInt(int64(val.Uint()))
}