aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/numbers.go
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/abi/numbers.go')
-rw-r--r--accounts/abi/numbers.go58
1 files changed, 30 insertions, 28 deletions
diff --git a/accounts/abi/numbers.go b/accounts/abi/numbers.go
index c37cd5f68..02609d567 100644
--- a/accounts/abi/numbers.go
+++ b/accounts/abi/numbers.go
@@ -23,36 +23,38 @@ import (
"github.com/ethereum/go-ethereum/common"
)
-var big_t = reflect.TypeOf(&big.Int{})
-var ubig_t = reflect.TypeOf(&big.Int{})
-var byte_t = reflect.TypeOf(byte(0))
-var byte_ts = reflect.TypeOf([]byte(nil))
-var uint_t = reflect.TypeOf(uint(0))
-var uint8_t = reflect.TypeOf(uint8(0))
-var uint16_t = reflect.TypeOf(uint16(0))
-var uint32_t = reflect.TypeOf(uint32(0))
-var uint64_t = reflect.TypeOf(uint64(0))
-var int_t = reflect.TypeOf(int(0))
-var int8_t = reflect.TypeOf(int8(0))
-var int16_t = reflect.TypeOf(int16(0))
-var int32_t = reflect.TypeOf(int32(0))
-var int64_t = reflect.TypeOf(int64(0))
-var hash_t = reflect.TypeOf(common.Hash{})
-var address_t = reflect.TypeOf(common.Address{})
+var (
+ big_t = reflect.TypeOf(&big.Int{})
+ ubig_t = reflect.TypeOf(&big.Int{})
+ byte_t = reflect.TypeOf(byte(0))
+ byte_ts = reflect.TypeOf([]byte(nil))
+ uint_t = reflect.TypeOf(uint(0))
+ uint8_t = reflect.TypeOf(uint8(0))
+ uint16_t = reflect.TypeOf(uint16(0))
+ uint32_t = reflect.TypeOf(uint32(0))
+ uint64_t = reflect.TypeOf(uint64(0))
+ int_t = reflect.TypeOf(int(0))
+ int8_t = reflect.TypeOf(int8(0))
+ int16_t = reflect.TypeOf(int16(0))
+ int32_t = reflect.TypeOf(int32(0))
+ int64_t = reflect.TypeOf(int64(0))
+ hash_t = reflect.TypeOf(common.Hash{})
+ address_t = reflect.TypeOf(common.Address{})
-var uint_ts = reflect.TypeOf([]uint(nil))
-var uint8_ts = reflect.TypeOf([]uint8(nil))
-var uint16_ts = reflect.TypeOf([]uint16(nil))
-var uint32_ts = reflect.TypeOf([]uint32(nil))
-var uint64_ts = reflect.TypeOf([]uint64(nil))
-var ubig_ts = reflect.TypeOf([]*big.Int(nil))
+ uint_ts = reflect.TypeOf([]uint(nil))
+ uint8_ts = reflect.TypeOf([]uint8(nil))
+ uint16_ts = reflect.TypeOf([]uint16(nil))
+ uint32_ts = reflect.TypeOf([]uint32(nil))
+ uint64_ts = reflect.TypeOf([]uint64(nil))
+ ubig_ts = reflect.TypeOf([]*big.Int(nil))
-var int_ts = reflect.TypeOf([]int(nil))
-var int8_ts = reflect.TypeOf([]int8(nil))
-var int16_ts = reflect.TypeOf([]int16(nil))
-var int32_ts = reflect.TypeOf([]int32(nil))
-var int64_ts = reflect.TypeOf([]int64(nil))
-var big_ts = reflect.TypeOf([]*big.Int(nil))
+ int_ts = reflect.TypeOf([]int(nil))
+ int8_ts = reflect.TypeOf([]int8(nil))
+ int16_ts = reflect.TypeOf([]int16(nil))
+ int32_ts = reflect.TypeOf([]int32(nil))
+ int64_ts = reflect.TypeOf([]int64(nil))
+ big_ts = reflect.TypeOf([]*big.Int(nil))
+)
// U256 will ensure unsigned 256bit on big nums
func U256(n *big.Int) []byte {