Skip to content

Commit

Permalink
eth qa
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhenchun committed Dec 22, 2021
1 parent 16af0cd commit 5a61282
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qa/eth/transact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ func TestTransaction(t *testing.T) {
receipt, err := cli.RpcClient.TransactionReceipt(context.Background(), tx.Hash())
rq.Nil(err)
fmt.Printf("transfer token, txid: %s, gas limit: %d, gas used: %d\n", tx.Hash().String(), tx.Gas(), receipt.GasUsed)

blockNum := receipt.BlockNumber.Int64()
evts, err := eth.FilterTransferLog(cli.RpcClient, blockNum, blockNum, []common.Address{contractAddr})
rq.Nil(err)
fmt.Printf("query transfer log: %+v\n", evts)
rq.True(len(evts) == 1)
}

{ // confirm transfer erc20
Expand Down
6 changes: 6 additions & 0 deletions qa/matic/transact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ func TestTransaction(t *testing.T) {
receipt, err := cli.RpcClient.TransactionReceipt(context.Background(), tx.Hash())
rq.Nil(err)
fmt.Printf("transfer token, txid: %s, gas limit: %d, gas used: %d\n", tx.Hash().String(), tx.Gas(), receipt.GasUsed)

blockNum := receipt.BlockNumber.Int64()
evts, err := eth.FilterTransferLog(cli.RpcClient, blockNum, blockNum, []common.Address{contractAddr})
rq.Nil(err)
fmt.Printf("query transfer log: %+v\n", evts)
rq.True(len(evts) == 1)
}

{ // confirm transfer erc20
Expand Down

0 comments on commit 5a61282

Please sign in to comment.