aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/numbers.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-16 18:27:38 +0800
committerobscuren <geffobscura@gmail.com>2015-03-16 18:27:38 +0800
commitb5234413611ce5984292f85a01de1f56c045b490 (patch)
treee6e0c6f7fe8358a2dc63cdea11ac66b4f59397f5 /accounts/abi/numbers.go
parent0b8f66ed9ef177dc72442dd7ba337c6733e30344 (diff)
downloadgo-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.gz
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.bz2
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.lz
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.xz
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.zst
go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.zip
Moved ethutil => common
Diffstat (limited to 'accounts/abi/numbers.go')
-rw-r--r--accounts/abi/numbers.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/accounts/abi/numbers.go b/accounts/abi/numbers.go
index 378f6541e..9205c005e 100644
--- a/accounts/abi/numbers.go
+++ b/accounts/abi/numbers.go
@@ -4,7 +4,7 @@ import (
"math/big"
"reflect"
- "github.com/ethereum/go-ethereum/ethutil"
+ "github.com/ethereum/go-ethereum/common"
)
var big_t = reflect.TypeOf(&big.Int{})
@@ -38,13 +38,13 @@ var big_ts = reflect.TypeOf([]*big.Int(nil))
// U256 will ensure unsigned 256bit on big nums
func U256(n *big.Int) []byte {
- return ethutil.LeftPadBytes(ethutil.U256(n).Bytes(), 32)
+ return common.LeftPadBytes(common.U256(n).Bytes(), 32)
}
func S256(n *big.Int) []byte {
- sint := ethutil.S256(n)
- ret := ethutil.LeftPadBytes(sint.Bytes(), 32)
- if sint.Cmp(ethutil.Big0) < 0 {
+ sint := common.S256(n)
+ ret := common.LeftPadBytes(sint.Bytes(), 32)
+ if sint.Cmp(common.Big0) < 0 {
for i, b := range ret {
if b == 0 {
ret[i] = 1