diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-16 18:27:38 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-16 18:27:38 +0800 |
commit | b5234413611ce5984292f85a01de1f56c045b490 (patch) | |
tree | e6e0c6f7fe8358a2dc63cdea11ac66b4f59397f5 /accounts/abi/type.go | |
parent | 0b8f66ed9ef177dc72442dd7ba337c6733e30344 (diff) | |
download | dexon-b5234413611ce5984292f85a01de1f56c045b490.tar dexon-b5234413611ce5984292f85a01de1f56c045b490.tar.gz dexon-b5234413611ce5984292f85a01de1f56c045b490.tar.bz2 dexon-b5234413611ce5984292f85a01de1f56c045b490.tar.lz dexon-b5234413611ce5984292f85a01de1f56c045b490.tar.xz dexon-b5234413611ce5984292f85a01de1f56c045b490.tar.zst dexon-b5234413611ce5984292f85a01de1f56c045b490.zip |
Moved ethutil => common
Diffstat (limited to 'accounts/abi/type.go')
-rw-r--r-- | accounts/abi/type.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/accounts/abi/type.go b/accounts/abi/type.go index b2d4abbd3..56520b672 100644 --- a/accounts/abi/type.go +++ b/accounts/abi/type.go @@ -6,7 +6,7 @@ import ( "regexp" "strconv" - "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/common" ) const ( @@ -157,7 +157,7 @@ func (t Type) pack(v interface{}) ([]byte, error) { if t.Size > -1 && value.Len() > t.Size { return nil, fmt.Errorf("%v out of bound. %d for %d", value.Kind(), value.Len(), t.Size) } - return []byte(ethutil.LeftPadString(t.String(), 32)), nil + return []byte(common.LeftPadString(t.String(), 32)), nil case reflect.Slice: if t.Size > -1 && value.Len() > t.Size { return nil, fmt.Errorf("%v out of bound. %d for %d", value.Kind(), value.Len(), t.Size) @@ -165,7 +165,7 @@ func (t Type) pack(v interface{}) ([]byte, error) { // Address is a special slice. The slice acts as one rather than a list of elements. if t.T == AddressTy { - return ethutil.LeftPadBytes(v.([]byte), 32), nil + return common.LeftPadBytes(v.([]byte), 32), nil } // Signed / Unsigned check @@ -180,9 +180,9 @@ func (t Type) pack(v interface{}) ([]byte, error) { return packed, nil case reflect.Bool: if value.Bool() { - return ethutil.LeftPadBytes(ethutil.Big1.Bytes(), 32), nil + return common.LeftPadBytes(common.Big1.Bytes(), 32), nil } else { - return ethutil.LeftPadBytes(ethutil.Big0.Bytes(), 32), nil + return common.LeftPadBytes(common.Big0.Bytes(), 32), nil } } |