mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-12 22:29:02 +00:00
BigInt accept string
This commit is contained in:
parent
80261c803a
commit
151f9c7f82
1 changed files with 2 additions and 0 deletions
|
|
@ -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()))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue