Skip to content

Commit 0023588

Browse files
committed
[rename] ERC20TransferTx() -> ERC20Transfers
1 parent e7997e8 commit 0023588

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

account.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ func (c *Client) InternalTxByAddress(address string, startBlock *int, endBlock *
7171
return
7272
}
7373

74-
// ERC20TransferTx get a list of "erc20 - token transfer events" by
74+
// ERC20Transfers get a list of "erc20 - token transfer events" by
7575
// contract address and/or from/to address.
7676
// leave undesired condition to nil.
77-
func (c *Client) ERC20TransferTx(contractAddress, address *string, startBlock *int, endBlock *int, page int, offset int) (txs []ERC20Transfer, err error) {
77+
func (c *Client) ERC20Transfers(contractAddress, address *string, startBlock *int, endBlock *int, page int, offset int) (txs []ERC20Transfer, err error) {
7878
param := M{
7979
"page": page,
8080
"offset": offset,

account_e2e_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ func TestClient_InternalTxByAddress(t *testing.T) {
6969
}
7070
}
7171

72-
func TestClient_ERC20TransferTx(t *testing.T) {
72+
func TestClient_ERC20Transfers(t *testing.T) {
7373
const wantLen = 3
7474

7575
var a, b = 3273004, 3328071
7676
var contract, address = "0xe0b7927c4af23765cb51314a0e0521a9645f0e2a", "0x4e83362442b8d1bec281594cea3050c8eb01311c"
77-
txs, err := api.ERC20TransferTx(&contract, &address, &a, &b, 1, 500)
78-
noError(t, err, "api.ERC20TransferTx")
77+
txs, err := api.ERC20Transfers(&contract, &address, &a, &b, 1, 500)
78+
noError(t, err, "api.ERC20Transfers")
7979

8080
//j, _ := json.MarshalIndent(txs, "", " ")
8181
//fmt.Printf("%s\n", j)

0 commit comments

Comments
 (0)