Skip to content

Commit

Permalink
fix test; modify module
Browse files Browse the repository at this point in the history
  • Loading branch information
outprog committed Nov 25, 2020
1 parent 973c84d commit d339c37
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Ethrpc
[![Tests](https://github.com/onrik/ethrpc/workflows/Tests/badge.svg)](https://github.com/onrik/ethrpc/actions)
[![Coverage Status](https://coveralls.io/repos/github/onrik/ethrpc/badge.svg?branch=master)](https://coveralls.io/github/onrik/ethrpc?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/onrik/ethrpc)](https://goreportcard.com/report/github.com/onrik/ethrpc)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/onrik/ethrpc)](https://pkg.go.dev/github.com/onrik/ethrpc)
[![Donate with Ethereum](https://en.cryptobadges.io/badge/micro/0xf4144308d6D67A1F00a61A596c0eB7B08411344a)](https://en.cryptobadges.io/donate/0xf4144308d6D67A1F00a61A596c0eB7B08411344a)

orked from [onrik/ethrpc](https://github.com/onrik/ethrpc)

Golang client for ethereum [JSON RPC API](https://github.com/ethereum/wiki/wiki/JSON-RPC).

Expand Down Expand Up @@ -80,7 +77,7 @@ import (
"fmt"
"log"

"github.com/onrik/ethrpc"
"github.com/everFinance/ethrpc"
)

func main() {
Expand Down
8 changes: 7 additions & 1 deletion ethrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,10 @@ func (s *EthRPCTestSuite) TestGetTransaction() {
"nonce": "0xa8",
"to": "0x8d12a197cb00d4747a1fe03395095ce2a5cc6819",
"transactionIndex": "0x98",
"value": "0x9184e72a000"
"value": "0x9184e72a000",
"r": "0x32c9f5da77aaacb83fbf3ce61c08f49668add324195e8cba3c9490508e39a3b4",
"s": "0x43052bcfef39d0012daccf8d93876e89269aefce78c5dad47c633e3297da153e",
"v": "0x1c"
}`
s.registerResponse(result, func(body []byte) {
s.methodEqual(body, "ggg")
Expand All @@ -920,6 +923,9 @@ func (s *EthRPCTestSuite) TestGetTransaction() {
s.Require().Equal(250000, transaction.Gas)
s.Require().Equal(newBigInt("4000000000"), transaction.GasPrice)
s.Require().Equal("0x522", transaction.Input)
s.Require().Equal("0x32c9f5da77aaacb83fbf3ce61c08f49668add324195e8cba3c9490508e39a3b4", transaction.R)
s.Require().Equal("0x43052bcfef39d0012daccf8d93876e89269aefce78c5dad47c633e3297da153e", transaction.S)
s.Require().Equal("0x1c", transaction.V)
}

func (s *EthRPCTestSuite) TestEthGetTransactionByHash() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/onrik/ethrpc
module github.com/everFinance/ethrpc

go 1.15

Expand Down
3 changes: 3 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ type proxyTransaction struct {
Gas hexInt `json:"gas"`
GasPrice hexBig `json:"gasPrice"`
Input string `json:"input"`
R string `json:"r"`
S string `json:"s"`
V string `json:"v"`
}

type proxyLog struct {
Expand Down

0 comments on commit d339c37

Please sign in to comment.