|
|
@ -17,6 +17,7 @@ |
|
|
|
package rpc |
|
|
|
package rpc |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
|
|
|
|
"encoding/binary" |
|
|
|
"encoding/json" |
|
|
|
"encoding/json" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"math/big" |
|
|
|
"math/big" |
|
|
@ -65,7 +66,9 @@ func newHexData(input interface{}) *hexdata { |
|
|
|
case int64: |
|
|
|
case int64: |
|
|
|
d.data = big.NewInt(input).Bytes() |
|
|
|
d.data = big.NewInt(input).Bytes() |
|
|
|
case uint64: |
|
|
|
case uint64: |
|
|
|
d.data = big.NewInt(int64(input)).Bytes() |
|
|
|
buff := make([]byte, 8) |
|
|
|
|
|
|
|
binary.BigEndian.PutUint64(buff, input) |
|
|
|
|
|
|
|
d.data = buff |
|
|
|
case int: |
|
|
|
case int: |
|
|
|
d.data = big.NewInt(int64(input)).Bytes() |
|
|
|
d.data = big.NewInt(int64(input)).Bytes() |
|
|
|
case uint: |
|
|
|
case uint: |
|
|
|