|
|
|
|
@ -12,7 +12,7 @@ import (
|
|
|
|
|
"strings" |
|
|
|
|
"sync" |
|
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil" |
|
|
|
|
|
|
|
|
|
"github.com/yuriy0803/open-etc-pool-friends/util" |
|
|
|
|
) |
|
|
|
|
@ -177,7 +177,7 @@ func (r *RPCClient) GetBalance(address string) (*big.Int, error) {
|
|
|
|
|
|
|
|
|
|
func (r *RPCClient) Sign(from string, s string) (string, error) { |
|
|
|
|
hash := sha256.Sum256([]byte(s)) |
|
|
|
|
rpcResp, err := r.doPost(r.Url, "eth_sign", []string{from, common.ToHex(hash[:])}) |
|
|
|
|
rpcResp, err := r.doPost(r.Url, "eth_sign", []string{from, hexutil.Encode(hash[:])}) |
|
|
|
|
var reply string |
|
|
|
|
if err != nil { |
|
|
|
|
return reply, err |
|
|
|
|
|