diff options
author | obscuren <geffobscura@gmail.com> | 2014-09-22 20:50:53 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-09-22 20:50:53 +0800 |
commit | 151f9c7f8214a2702a76f36f566b52266949ac89 (patch) | |
tree | 502479580b1bf3261997cb76aa9f7f071965a907 /ethutil | |
parent | 80261c803a82e51413608a3dc5273c982844d135 (diff) | |
download | go-tangerine-151f9c7f8214a2702a76f36f566b52266949ac89.tar.gz go-tangerine-151f9c7f8214a2702a76f36f566b52266949ac89.tar.zst go-tangerine-151f9c7f8214a2702a76f36f566b52266949ac89.zip |
BigInt accept string
Diffstat (limited to 'ethutil')
-rw-r--r-- | ethutil/value.go | 2 |
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())) } |