From 0067dcb648d8c5d6d6d72eb9ac1be7cee4d2a505 Mon Sep 17 00:00:00 2001 From: Roman Petriv Date: Fri, 13 Oct 2023 02:20:11 +0300 Subject: [PATCH] test: add unit tests --- .../api/src/transfer/transfer.service.spec.ts | 37 +++---- packages/api/src/transfer/transfer.service.ts | 3 +- .../finalizeDeposit/default.handler.spec.ts | 3 + .../mint/ethMintFromL1.handler.spec.ts | 6 ++ .../contractDeployerTransfer.handler.spec.ts | 6 ++ .../transfer/default.handler.spec.ts | 3 + .../transfer/erc721Transfer.handle.spec.ts | 6 ++ .../ethWithdrawalToL1.handler.spec.ts | 6 ++ .../default.handler.spec.ts | 3 + .../src/transfer/transfer.service.spec.ts | 102 ++++++++++++++++++ 10 files changed, 153 insertions(+), 22 deletions(-) diff --git a/packages/api/src/transfer/transfer.service.spec.ts b/packages/api/src/transfer/transfer.service.spec.ts index 79df6df828..1334328b4b 100644 --- a/packages/api/src/transfer/transfer.service.spec.ts +++ b/packages/api/src/transfer/transfer.service.spec.ts @@ -228,18 +228,17 @@ describe("TransferService", () => { }); describe("when token type is ERC20", () => { - it("adds ERC20 filter", async () => { + it("adds tokenAddress filter", async () => { await service.findTokenTransfers(filterOptions); expect(queryBuilderMock.where).toBeCalledTimes(1); expect(queryBuilderMock.where).toHaveBeenCalledWith({ tokenAddress: filterOptions.tokenAddress, - fields: typeorm.IsNull(), }); }); }); describe("when token type is ERC721", () => { - it("adds ERC721 filter", async () => { + it("adds tokenAddress filter", async () => { await service.findTokenTransfers({ ...filterOptions, tokenType: TokenType.ERC721, @@ -247,7 +246,6 @@ describe("TransferService", () => { expect(queryBuilderMock.where).toBeCalledTimes(1); expect(queryBuilderMock.where).toHaveBeenCalledWith({ tokenAddress: "tokenAddress", - fields: typeorm.Not(typeorm.IsNull()), }); }); }); @@ -345,13 +343,19 @@ describe("TransferService", () => { }); describe("when token type is ERC20", () => { - it("adds ERC20 filter", async () => { + it("adds address and ERC20 filter", async () => { await service.findTokenTransfers(filterOptions); expect(addressTransfersQueryBuilderMock.where).toBeCalledTimes(1); expect(addressTransfersQueryBuilderMock.where).toHaveBeenCalledWith({ address: filterOptions.address, - fields: typeorm.IsNull(), }); + expect(addressTransfersQueryBuilderMock.andWhere).toBeCalledTimes(1); + expect(addressTransfersQueryBuilderMock.andWhere).toHaveBeenCalledWith( + `"addressTransfer"."tokenType" = :tokenType`, + { + tokenType: TokenType.ERC20, + } + ); }); }); @@ -364,8 +368,14 @@ describe("TransferService", () => { expect(addressTransfersQueryBuilderMock.where).toBeCalledTimes(1); expect(addressTransfersQueryBuilderMock.where).toHaveBeenCalledWith({ address: filterOptions.address, - fields: typeorm.Not(typeorm.IsNull()), }); + expect(addressTransfersQueryBuilderMock.andWhere).toBeCalledTimes(1); + expect(addressTransfersQueryBuilderMock.andWhere).toHaveBeenCalledWith( + `"addressTransfer"."tokenType" = :tokenType`, + { + tokenType: TokenType.ERC721, + } + ); }); }); @@ -385,19 +395,6 @@ describe("TransferService", () => { }); }); - describe("when token address is not specified", () => { - it("adds filter to exclude ETH token", async () => { - await service.findTokenTransfers(filterOptions); - expect(addressTransfersQueryBuilderMock.andWhere).toBeCalledTimes(1); - expect(addressTransfersQueryBuilderMock.andWhere).toHaveBeenCalledWith( - `"addressTransfer"."tokenAddress" != :tokenAddress`, - { - tokenAddress: normalizeAddressTransformer.to(L2_ETH_TOKEN_ADDRESS), - } - ); - }); - }); - it("joins transfers and tokens records to the address transfers", async () => { await service.findTokenTransfers(filterOptions); expect(addressTransfersQueryBuilderMock.leftJoinAndSelect).toBeCalledTimes(2); diff --git a/packages/api/src/transfer/transfer.service.ts b/packages/api/src/transfer/transfer.service.ts index 36b69bca6b..9e677a34d0 100644 --- a/packages/api/src/transfer/transfer.service.ts +++ b/packages/api/src/transfer/transfer.service.ts @@ -1,9 +1,8 @@ import { BadRequestException, Injectable } from "@nestjs/common"; import { InjectRepository } from "@nestjs/typeorm"; -import { Repository, FindOperator, MoreThanOrEqual, LessThanOrEqual, IsNull, Not } from "typeorm"; +import { Repository, FindOperator, MoreThanOrEqual, LessThanOrEqual } from "typeorm"; import { Pagination } from "nestjs-typeorm-paginate"; import { paginate } from "../common/utils"; -import { L2_ETH_TOKEN_ADDRESS } from "../common/constants"; import { IPaginationOptions, SortingOrder } from "../common/types"; import { Transfer } from "./transfer.entity"; import { TokenType } from "../token/token.entity"; diff --git a/packages/worker/src/transfer/extractHandlers/finalizeDeposit/default.handler.spec.ts b/packages/worker/src/transfer/extractHandlers/finalizeDeposit/default.handler.spec.ts index 4a32692f83..1c8f6eaa23 100644 --- a/packages/worker/src/transfer/extractHandlers/finalizeDeposit/default.handler.spec.ts +++ b/packages/worker/src/transfer/extractHandlers/finalizeDeposit/default.handler.spec.ts @@ -3,6 +3,7 @@ import { types, utils } from "zksync-web3"; import { mock } from "jest-mock-extended"; import { ZERO_HASH_64 } from "../../../constants"; import { TransferType } from "../../../entities/transfer.entity"; +import { TokenType } from "../../../entities/token.entity"; import { defaultFinalizeDepositHandler } from "./default.handler"; describe("defaultFinalizeDepositHandler", () => { @@ -66,11 +67,13 @@ describe("defaultFinalizeDepositHandler", () => { log.topics[3] = ZERO_HASH_64; const result = defaultFinalizeDepositHandler.extract(log, blockDetails); expect(result.tokenAddress).toBe(utils.L2_ETH_TOKEN_ADDRESS); + expect(result.tokenType).toBe(TokenType.ETH); }); it("extracts transfer with tokenAddress field populated with lower cased l2Token", () => { const result = defaultFinalizeDepositHandler.extract(log, blockDetails); expect(result.tokenAddress).toBe("0xdc187378edd8ed1585fb47549cc5fe633295d571"); + expect(result.tokenType).toBe(TokenType.ERC20); }); it("extracts transfer of deposit type", () => { diff --git a/packages/worker/src/transfer/extractHandlers/mint/ethMintFromL1.handler.spec.ts b/packages/worker/src/transfer/extractHandlers/mint/ethMintFromL1.handler.spec.ts index ec816e5442..ff6441d3cd 100644 --- a/packages/worker/src/transfer/extractHandlers/mint/ethMintFromL1.handler.spec.ts +++ b/packages/worker/src/transfer/extractHandlers/mint/ethMintFromL1.handler.spec.ts @@ -2,6 +2,7 @@ import { BigNumber } from "ethers"; import { types, utils } from "zksync-web3"; import { mock } from "jest-mock-extended"; import { TransferType } from "../../../entities/transfer.entity"; +import { TokenType } from "../../../entities/token.entity"; import { ethMintFromL1Handler } from "./ethMintFromL1.handler"; describe("ethMintFromL1Handler", () => { @@ -60,6 +61,11 @@ describe("ethMintFromL1Handler", () => { expect(result.blockNumber).toBe(215276); }); + it("extracts transfer with tokenType as ETH", () => { + const result = ethMintFromL1Handler.extract(log, blockDetails); + expect(result.tokenType).toBe(TokenType.ETH); + }); + it("extracts transfer with populated amount", () => { const result = ethMintFromL1Handler.extract(log, blockDetails); expect(result.amount).toStrictEqual(BigNumber.from("0x6f05b59d3b20000")); diff --git a/packages/worker/src/transfer/extractHandlers/transfer/contractDeployerTransfer.handler.spec.ts b/packages/worker/src/transfer/extractHandlers/transfer/contractDeployerTransfer.handler.spec.ts index c9c5195eea..57e64e8949 100644 --- a/packages/worker/src/transfer/extractHandlers/transfer/contractDeployerTransfer.handler.spec.ts +++ b/packages/worker/src/transfer/extractHandlers/transfer/contractDeployerTransfer.handler.spec.ts @@ -2,6 +2,7 @@ import { BigNumber } from "ethers"; import { types } from "zksync-web3"; import { mock } from "jest-mock-extended"; import { TransferType } from "../../../entities/transfer.entity"; +import { TokenType } from "../../../entities/token.entity"; import { contractDeployerTransferHandler } from "./contractDeployerTransfer.handler"; describe("contractDeployerTransferHandler", () => { @@ -117,6 +118,11 @@ describe("contractDeployerTransferHandler", () => { expect(result.type).toBe(TransferType.Mint); }); + it("extracts transfer with ERC20 token type", () => { + const result = contractDeployerTransferHandler.extract(log, blockDetails); + expect(result.tokenType).toBe(TokenType.ERC20); + }); + it("adds isFeeOrRefund as false", () => { const result = contractDeployerTransferHandler.extract(log, blockDetails); expect(result.isFeeOrRefund).toBe(false); diff --git a/packages/worker/src/transfer/extractHandlers/transfer/default.handler.spec.ts b/packages/worker/src/transfer/extractHandlers/transfer/default.handler.spec.ts index 31af1998b8..20c96ec742 100644 --- a/packages/worker/src/transfer/extractHandlers/transfer/default.handler.spec.ts +++ b/packages/worker/src/transfer/extractHandlers/transfer/default.handler.spec.ts @@ -2,6 +2,7 @@ import { BigNumber } from "ethers"; import { types, utils } from "zksync-web3"; import { mock } from "jest-mock-extended"; import { TransferType } from "../../../entities/transfer.entity"; +import { TokenType } from "../../../entities/token.entity"; import { defaultTransferHandler } from "./default.handler"; describe("defaultTransferHandler", () => { @@ -101,11 +102,13 @@ describe("defaultTransferHandler", () => { log.address = utils.L2_ETH_TOKEN_ADDRESS; const result = defaultTransferHandler.extract(log, blockDetails); expect(result.tokenAddress).toBe(utils.L2_ETH_TOKEN_ADDRESS); + expect(result.tokenType).toBe(TokenType.ETH); }); it("extracts transfer with tokenAddress field populated with lower cased log address", () => { const result = defaultTransferHandler.extract(log, blockDetails); expect(result.tokenAddress).toBe("0xc7e0220d02d549c4846a6ec31d89c3b670ebe35c"); + expect(result.tokenType).toBe(TokenType.ERC20); }); it("extracts transfer of fee type if to address is a bootloader address", () => { diff --git a/packages/worker/src/transfer/extractHandlers/transfer/erc721Transfer.handle.spec.ts b/packages/worker/src/transfer/extractHandlers/transfer/erc721Transfer.handle.spec.ts index ff2bb1050c..38b74f0a14 100644 --- a/packages/worker/src/transfer/extractHandlers/transfer/erc721Transfer.handle.spec.ts +++ b/packages/worker/src/transfer/extractHandlers/transfer/erc721Transfer.handle.spec.ts @@ -3,6 +3,7 @@ import { types } from "zksync-web3"; import { mock } from "jest-mock-extended"; import { ZERO_HASH_64 } from "../../../constants"; import { TransferType } from "../../../entities/transfer.entity"; +import { TokenType } from "../../../entities/token.entity"; import { erc721TransferHandler } from "./erc721Transfer.handler"; describe("erc721TransferHandler", () => { @@ -90,6 +91,11 @@ describe("erc721TransferHandler", () => { expect(result.tokenAddress).toBe("0x89bcb56033920b8a654109faeb1f87e0c3358cad"); }); + it("extracts transfer of ERC721 token type", () => { + const result = erc721TransferHandler.extract(log, blockDetails); + expect(result.tokenType).toBe(TokenType.ERC721); + }); + it("extracts transfer of transfer type if from address is not a zero address", () => { const result = erc721TransferHandler.extract(log, blockDetails); expect(result.type).toBe(TransferType.Transfer); diff --git a/packages/worker/src/transfer/extractHandlers/withdrawal/ethWithdrawalToL1.handler.spec.ts b/packages/worker/src/transfer/extractHandlers/withdrawal/ethWithdrawalToL1.handler.spec.ts index e762d72b3b..a279e45014 100644 --- a/packages/worker/src/transfer/extractHandlers/withdrawal/ethWithdrawalToL1.handler.spec.ts +++ b/packages/worker/src/transfer/extractHandlers/withdrawal/ethWithdrawalToL1.handler.spec.ts @@ -2,6 +2,7 @@ import { BigNumber } from "ethers"; import { types, utils } from "zksync-web3"; import { mock } from "jest-mock-extended"; import { TransferType } from "../../../entities/transfer.entity"; +import { TokenType } from "../../../entities/token.entity"; import { ethWithdrawalToL1Handler } from "./ethWithdrawalToL1.handler"; describe("ethWithdrawalToL1Handler", () => { @@ -76,6 +77,11 @@ describe("ethWithdrawalToL1Handler", () => { expect(result.type).toBe(TransferType.Withdrawal); }); + it("extracts transfer of ETH token type", () => { + const result = ethWithdrawalToL1Handler.extract(log, blockDetails); + expect(result.tokenType).toBe(TokenType.ETH); + }); + it("adds isFeeOrRefund as false", () => { const result = ethWithdrawalToL1Handler.extract(log, blockDetails); expect(result.isFeeOrRefund).toBe(false); diff --git a/packages/worker/src/transfer/extractHandlers/withdrawalInitiated/default.handler.spec.ts b/packages/worker/src/transfer/extractHandlers/withdrawalInitiated/default.handler.spec.ts index 502d675ce9..76e6cec0e1 100644 --- a/packages/worker/src/transfer/extractHandlers/withdrawalInitiated/default.handler.spec.ts +++ b/packages/worker/src/transfer/extractHandlers/withdrawalInitiated/default.handler.spec.ts @@ -3,6 +3,7 @@ import { types, utils } from "zksync-web3"; import { mock } from "jest-mock-extended"; import { ZERO_HASH_64 } from "../../../constants"; import { TransferType } from "../../../entities/transfer.entity"; +import { TokenType } from "../../../entities/token.entity"; import { defaultWithdrawalInitiatedHandler } from "./default.handler"; describe("defaultWithdrawalInitiatedHandler", () => { @@ -66,11 +67,13 @@ describe("defaultWithdrawalInitiatedHandler", () => { log.topics[3] = ZERO_HASH_64; const result = defaultWithdrawalInitiatedHandler.extract(log, blockDetails); expect(result.tokenAddress).toBe(utils.L2_ETH_TOKEN_ADDRESS); + expect(result.tokenType).toBe(TokenType.ETH); }); it("extracts transfer with tokenAddress field populated with lower cased l2Token", () => { const result = defaultWithdrawalInitiatedHandler.extract(log, blockDetails); expect(result.tokenAddress).toBe("0xdc187378edd8ed1585fb47549cc5fe633295d571"); + expect(result.tokenType).toBe(TokenType.ERC20); }); it("extracts transfer of deposit type", () => { diff --git a/packages/worker/src/transfer/transfer.service.spec.ts b/packages/worker/src/transfer/transfer.service.spec.ts index 48ee501648..682e70ad48 100644 --- a/packages/worker/src/transfer/transfer.service.spec.ts +++ b/packages/worker/src/transfer/transfer.service.spec.ts @@ -6,6 +6,7 @@ import { types } from "zksync-web3"; import { TransferRepository } from "../repositories"; import { TransferService } from "./transfer.service"; import { BlockchainService } from "../blockchain/blockchain.service"; +import { TokenType } from "../entities/token.entity"; import * as ethDepositNoFee from "../../test/transactionReceipts/eth/deposit-no-fee.json"; import * as ethDepositZeroValue from "../../test/transactionReceipts/eth/deposit-zero-value.json"; @@ -119,6 +120,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0xd206eaf6819007535e893410cfa01885ce40e99a", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x7cc7cc0326af164b15de04de3b153a7a55afb14a7897298a0a84f9507d483d1d", type: "deposit", isFeeOrRefund: false, @@ -133,6 +135,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x7cc7cc0326af164b15de04de3b153a7a55afb14a7897298a0a84f9507d483d1d", type: "transfer", isFeeOrRefund: false, @@ -147,6 +150,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0xd206eaf6819007535e893410cfa01885ce40e99a", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x7cc7cc0326af164b15de04de3b153a7a55afb14a7897298a0a84f9507d483d1d", type: "deposit", isFeeOrRefund: false, @@ -181,6 +185,7 @@ describe("TransferService", () => { blockNumber: 7485644, amount: BigNumber.from("0x2386f26fc10000"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "deposit", isFeeOrRefund: false, isInternal: false, @@ -195,6 +200,7 @@ describe("TransferService", () => { blockNumber: 7485644, amount: BigNumber.from("0x2386f26fc10000"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "transfer", isFeeOrRefund: false, isInternal: false, @@ -209,6 +215,7 @@ describe("TransferService", () => { blockNumber: 7485644, amount: BigNumber.from("0x0141b56ff62900"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "fee", isFeeOrRefund: true, isInternal: false, @@ -223,6 +230,7 @@ describe("TransferService", () => { blockNumber: 7485644, amount: BigNumber.from("0x29eb1faec300"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "refund", isFeeOrRefund: true, isInternal: false, @@ -256,6 +264,7 @@ describe("TransferService", () => { blockNumber: 7483775, amount: BigNumber.from("0x11c37937e08000"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "deposit", isFeeOrRefund: false, isInternal: false, @@ -270,6 +279,7 @@ describe("TransferService", () => { blockNumber: 7483775, amount: BigNumber.from("0x11c37937e08000"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "transfer", isFeeOrRefund: false, isInternal: false, @@ -284,6 +294,7 @@ describe("TransferService", () => { blockNumber: 7483775, amount: BigNumber.from("0x0150b5fa93bf00"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "fee", isFeeOrRefund: true, isInternal: false, @@ -298,6 +309,7 @@ describe("TransferService", () => { blockNumber: 7483775, amount: BigNumber.from("0xdb01bc43a500"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "refund", isFeeOrRefund: true, isInternal: false, @@ -331,6 +343,7 @@ describe("TransferService", () => { blockNumber: 7485219, amount: BigNumber.from("0x010425b6917e00"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "fee", isFeeOrRefund: true, isInternal: false, @@ -345,6 +358,7 @@ describe("TransferService", () => { blockNumber: 7485219, amount: BigNumber.from("0x7c948f3acf00"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "refund", isFeeOrRefund: true, isInternal: false, @@ -377,6 +391,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xc697e19d80645ec37df566e1227edad4652d010e43c508bbd04efbaeb47e2c48", type: "fee", isFeeOrRefund: true, @@ -391,6 +406,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0xc9593dc3dcad5f3804aaa5af12a9d74d0c00e4b0", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xc697e19d80645ec37df566e1227edad4652d010e43c508bbd04efbaeb47e2c48", type: "transfer", isFeeOrRefund: false, @@ -422,6 +438,7 @@ describe("TransferService", () => { from: "0xd2229549f09af28dd0c21b1ade77f739aa8406b5", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x4ae2d3cf9b7e4d25b4323f7e8715521172bda4dfc88cfaf6b40c8cf80165b985", type: "fee", isFeeOrRefund: true, @@ -436,6 +453,7 @@ describe("TransferService", () => { from: "0xd2229549f09af28dd0c21b1ade77f739aa8406b5", to: "0x0000000000000000000000000000000000000000", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x4ae2d3cf9b7e4d25b4323f7e8715521172bda4dfc88cfaf6b40c8cf80165b985", type: "transfer", isFeeOrRefund: false, @@ -469,6 +487,7 @@ describe("TransferService", () => { from: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x69d3dcb5822096bab259dbba2a1b42bdfd6d1e5c4169196893cf1998ab2ca85f", type: "fee", isFeeOrRefund: true, @@ -483,6 +502,7 @@ describe("TransferService", () => { from: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", to: "0x000000000000000000000000000000000000800a", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x69d3dcb5822096bab259dbba2a1b42bdfd6d1e5c4169196893cf1998ab2ca85f", type: "transfer", isFeeOrRefund: false, @@ -497,6 +517,7 @@ describe("TransferService", () => { from: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", to: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x69d3dcb5822096bab259dbba2a1b42bdfd6d1e5c4169196893cf1998ab2ca85f", type: "withdrawal", isFeeOrRefund: false, @@ -511,6 +532,7 @@ describe("TransferService", () => { from: "0x0000000000000000000000000000000000008001", to: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x69d3dcb5822096bab259dbba2a1b42bdfd6d1e5c4169196893cf1998ab2ca85f", type: "refund", isFeeOrRefund: true, @@ -544,6 +566,7 @@ describe("TransferService", () => { from: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x33bfd18a0aea94ba39742a9a1df595462322ecbbb25c0f767a0bf6acb41dfb2f", type: "fee", isFeeOrRefund: true, @@ -558,6 +581,7 @@ describe("TransferService", () => { from: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", to: "0x000000000000000000000000000000000000800a", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x33bfd18a0aea94ba39742a9a1df595462322ecbbb25c0f767a0bf6acb41dfb2f", type: "transfer", isFeeOrRefund: false, @@ -572,6 +596,7 @@ describe("TransferService", () => { from: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", to: "0xd206eaf6819007535e893410cfa01885ce40e99a", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x33bfd18a0aea94ba39742a9a1df595462322ecbbb25c0f767a0bf6acb41dfb2f", type: "withdrawal", isFeeOrRefund: false, @@ -586,6 +611,7 @@ describe("TransferService", () => { from: "0x0000000000000000000000000000000000008001", to: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x33bfd18a0aea94ba39742a9a1df595462322ecbbb25c0f767a0bf6acb41dfb2f", type: "refund", isFeeOrRefund: true, @@ -619,6 +645,7 @@ describe("TransferService", () => { blockNumber: 7508823, amount: BigNumber.from("0xb782effd8200"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "fee", isFeeOrRefund: true, isInternal: false, @@ -633,6 +660,7 @@ describe("TransferService", () => { blockNumber: 7508823, amount: BigNumber.from("0x00"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "withdrawal", isFeeOrRefund: false, isInternal: false, @@ -647,6 +675,7 @@ describe("TransferService", () => { blockNumber: 7508823, amount: BigNumber.from("0x71e06f110780"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "refund", isFeeOrRefund: true, isInternal: false, @@ -678,6 +707,7 @@ describe("TransferService", () => { from: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x33bfd18a0aea94ba39742a9a1df595462322ecbbb25c0f767a0bf6acb41dfb2f", type: "fee", isFeeOrRefund: true, @@ -692,6 +722,7 @@ describe("TransferService", () => { from: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", to: "0x000000000000000000000000000000000000800a", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x33bfd18a0aea94ba39742a9a1df595462322ecbbb25c0f767a0bf6acb41dfb2f", type: "transfer", isFeeOrRefund: false, @@ -706,6 +737,7 @@ describe("TransferService", () => { from: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", to: "0xd206eaf6819007535e893410cfa01885ce40e99a", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x33bfd18a0aea94ba39742a9a1df595462322ecbbb25c0f767a0bf6acb41dfb2f", type: "withdrawal", isFeeOrRefund: false, @@ -720,6 +752,7 @@ describe("TransferService", () => { from: "0x0000000000000000000000000000000000008001", to: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x33bfd18a0aea94ba39742a9a1df595462322ecbbb25c0f767a0bf6acb41dfb2f", type: "refund", isFeeOrRefund: true, @@ -754,6 +787,7 @@ describe("TransferService", () => { from: "0x0000000000000000000000000000000000000000", to: "0x481e48ce19781c3ca573967216dee75fdcf70f54", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0x25f9bd9de8260b53e2765cddb6aaafce5256fca647434c72559f0a0fb77bd715", type: "transfer", isFeeOrRefund: false, @@ -768,6 +802,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x481e48ce19781c3ca573967216dee75fdcf70f54", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0x25f9bd9de8260b53e2765cddb6aaafce5256fca647434c72559f0a0fb77bd715", type: "deposit", isFeeOrRefund: false, @@ -800,6 +835,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xf8835220234eecd1a6dfd4dc1be8594e6f076d73107497b665a97a6d694320ad", type: "fee", isFeeOrRefund: true, @@ -814,6 +850,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0xc9593dc3dcad5f3804aaa5af12a9d74d0c00e4b0", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0xf8835220234eecd1a6dfd4dc1be8594e6f076d73107497b665a97a6d694320ad", type: "transfer", isFeeOrRefund: false, @@ -846,6 +883,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x37f670de38b93e28c3ecf5ede9b4c96a4d26f2aa6c53bb6ffc7a040f559d8abb", type: "fee", isFeeOrRefund: true, @@ -860,6 +898,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000000000", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0x37f670de38b93e28c3ecf5ede9b4c96a4d26f2aa6c53bb6ffc7a040f559d8abb", type: "transfer", isFeeOrRefund: false, @@ -874,6 +913,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x481e48ce19781c3ca573967216dee75fdcf70f54", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0x37f670de38b93e28c3ecf5ede9b4c96a4d26f2aa6c53bb6ffc7a040f559d8abb", type: "withdrawal", isFeeOrRefund: false, @@ -906,6 +946,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x85dc1a3b141cdc67ed5f787c688d9ea8976363c875b5c4d3347cac69bcd23108", type: "fee", isFeeOrRefund: true, @@ -920,6 +961,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000000000", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0x85dc1a3b141cdc67ed5f787c688d9ea8976363c875b5c4d3347cac69bcd23108", type: "transfer", isFeeOrRefund: false, @@ -934,6 +976,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0xc9593dc3dcad5f3804aaa5af12a9d74d0c00e4b0", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0x85dc1a3b141cdc67ed5f787c688d9ea8976363c875b5c4d3347cac69bcd23108", type: "withdrawal", isFeeOrRefund: false, @@ -968,6 +1011,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x7ec71b1d5369b830af3f7af4b1ef0f04e62cc3775b1c090434a93493d1b68632", type: "fee", isFeeOrRefund: true, @@ -1000,6 +1044,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xaa4f89b2adc9ae0fc50d058ebc7d75ddd54b0d83c307474b09989def4a0f2fbe", type: "fee", isFeeOrRefund: true, @@ -1034,6 +1079,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x55f31c010dc9ae929e192cd9950027e09b647543b3d7b0f866cb74bc7941009d", type: "fee", isFeeOrRefund: true, @@ -1048,6 +1094,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x481e48ce19781c3ca573967216dee75fdcf70f54", tokenAddress: "0xd144ca8aa2e7dfecd56a3cccba1cd873c8e5db58", + tokenType: TokenType.ERC20, transactionHash: "0x55f31c010dc9ae929e192cd9950027e09b647543b3d7b0f866cb74bc7941009d", type: "mint", isFeeOrRefund: false, @@ -1080,6 +1127,7 @@ describe("TransferService", () => { from: "0x0000000000000000000000000000000000000000", to: "0xb7e2355b87ff9ae9b146ca6dcee9c02157937b01", tokenAddress: "0xdc187378edd8ed1585fb47549cc5fe633295d571", + tokenType: TokenType.ERC20, transactionHash: "0x5e018d2a81dbd1ef80ff45171dd241cb10670dcb091e324401ff8f52293841b0", type: "transfer", isFeeOrRefund: false, @@ -1094,6 +1142,7 @@ describe("TransferService", () => { from: "0xb7e2355b87ff9ae9b146ca6dcee9c02157937b01", to: "0xb7e2355b87ff9ae9b146ca6dcee9c02157937b01", tokenAddress: "0xdc187378edd8ed1585fb47549cc5fe633295d571", + tokenType: TokenType.ERC20, transactionHash: "0x5e018d2a81dbd1ef80ff45171dd241cb10670dcb091e324401ff8f52293841b0", type: "deposit", isFeeOrRefund: false, @@ -1127,6 +1176,7 @@ describe("TransferService", () => { blockNumber: 7483775, amount: BigNumber.from("0x11c37937e08000"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "deposit", isFeeOrRefund: false, isInternal: false, @@ -1141,6 +1191,7 @@ describe("TransferService", () => { blockNumber: 7483775, amount: BigNumber.from("0x11c37937e08000"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "transfer", isFeeOrRefund: false, isInternal: false, @@ -1155,6 +1206,7 @@ describe("TransferService", () => { blockNumber: 7483775, amount: BigNumber.from("0x0150b5fa93bf00"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "fee", isFeeOrRefund: true, isInternal: false, @@ -1169,6 +1221,7 @@ describe("TransferService", () => { blockNumber: 7483775, amount: BigNumber.from("0xdb01bc43a500"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "refund", isFeeOrRefund: true, isInternal: false, @@ -1200,6 +1253,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xbb9c4b21c235ada7be48da89ca574dfb3c1f9126f3b879060ace14e37239053d", type: "fee", isFeeOrRefund: true, @@ -1214,6 +1268,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", tokenAddress: "0x7aa5f26e03b12a78e3ff1c454547701443144c67", + tokenType: TokenType.ERC20, transactionHash: "0xbb9c4b21c235ada7be48da89ca574dfb3c1f9126f3b879060ace14e37239053d", type: "transfer", isFeeOrRefund: false, @@ -1247,6 +1302,7 @@ describe("TransferService", () => { blockNumber: 7492781, amount: BigNumber.from("0xc51affb6ed80"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "fee", isFeeOrRefund: true, isInternal: false, @@ -1261,6 +1317,7 @@ describe("TransferService", () => { blockNumber: 7492781, amount: BigNumber.from("0x055de6a779bbac0000"), tokenAddress: "0x24a5f3f8b311b053a55c90cfff3bd2ee34c85fc0", + tokenType: TokenType.ERC20, type: "transfer", isFeeOrRefund: false, isInternal: false, @@ -1275,6 +1332,7 @@ describe("TransferService", () => { blockNumber: 7492781, amount: BigNumber.from("0x055de6a779bbac0000"), tokenAddress: "0x24a5f3f8b311b053a55c90cfff3bd2ee34c85fc0", + tokenType: TokenType.ERC20, type: "withdrawal", isFeeOrRefund: false, isInternal: false, @@ -1289,6 +1347,7 @@ describe("TransferService", () => { blockNumber: 7492781, amount: BigNumber.from("0x780bd72ca280"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "refund", isFeeOrRefund: true, isInternal: false, @@ -1322,6 +1381,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x9a9218b64947ffc0e7993c1dd2cbc3377b33c0773a445662e8c833ed17369cf3", type: "fee", isFeeOrRefund: true, @@ -1336,6 +1396,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x08b222f412eb5d141fb32db443f2eed06ae65a24", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x9a9218b64947ffc0e7993c1dd2cbc3377b33c0773a445662e8c833ed17369cf3", type: "transfer", isFeeOrRefund: false, @@ -1350,6 +1411,7 @@ describe("TransferService", () => { from: "0x08b222f412eb5d141fb32db443f2eed06ae65a24", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x9a9218b64947ffc0e7993c1dd2cbc3377b33c0773a445662e8c833ed17369cf3", type: "transfer", isFeeOrRefund: false, @@ -1364,6 +1426,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x2baec5bca9f2052489ed30668f27ab4466f0bcb3", + tokenType: TokenType.ERC20, transactionHash: "0x9a9218b64947ffc0e7993c1dd2cbc3377b33c0773a445662e8c833ed17369cf3", type: "transfer", isFeeOrRefund: false, @@ -1378,6 +1441,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0x9a9218b64947ffc0e7993c1dd2cbc3377b33c0773a445662e8c833ed17369cf3", type: "transfer", isFeeOrRefund: false, @@ -1392,6 +1456,7 @@ describe("TransferService", () => { from: "0x08b222f412eb5d141fb32db443f2eed06ae65a24", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x9a9218b64947ffc0e7993c1dd2cbc3377b33c0773a445662e8c833ed17369cf3", type: "transfer", isFeeOrRefund: false, @@ -1406,6 +1471,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x2baec5bca9f2052489ed30668f27ab4466f0bcb3", + tokenType: TokenType.ERC20, transactionHash: "0x9a9218b64947ffc0e7993c1dd2cbc3377b33c0773a445662e8c833ed17369cf3", type: "transfer", isFeeOrRefund: false, @@ -1420,6 +1486,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0x9a9218b64947ffc0e7993c1dd2cbc3377b33c0773a445662e8c833ed17369cf3", type: "transfer", isFeeOrRefund: false, @@ -1452,6 +1519,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0265d9a5af8af5fe070933e5e549d8fef08e09f4", tokenAddress: "0x2baec5bca9f2052489ed30668f27ab4466f0bcb3", + tokenType: TokenType.ERC20, transactionHash: "0xeae0368e1457fa55da486ffc772cc654d3d5b95faa220fa971ff73077fccd370", type: "transfer", isFeeOrRefund: false, @@ -1466,6 +1534,7 @@ describe("TransferService", () => { from: "0x0265d9a5af8af5fe070933e5e549d8fef08e09f4", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xeae0368e1457fa55da486ffc772cc654d3d5b95faa220fa971ff73077fccd370", type: "fee", isFeeOrRefund: true, @@ -1480,6 +1549,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x08b222f412eb5d141fb32db443f2eed06ae65a24", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xeae0368e1457fa55da486ffc772cc654d3d5b95faa220fa971ff73077fccd370", type: "transfer", isFeeOrRefund: false, @@ -1494,6 +1564,7 @@ describe("TransferService", () => { from: "0x08b222f412eb5d141fb32db443f2eed06ae65a24", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xeae0368e1457fa55da486ffc772cc654d3d5b95faa220fa971ff73077fccd370", type: "transfer", isFeeOrRefund: false, @@ -1508,6 +1579,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x2baec5bca9f2052489ed30668f27ab4466f0bcb3", + tokenType: TokenType.ERC20, transactionHash: "0xeae0368e1457fa55da486ffc772cc654d3d5b95faa220fa971ff73077fccd370", type: "transfer", isFeeOrRefund: false, @@ -1522,6 +1594,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0xeae0368e1457fa55da486ffc772cc654d3d5b95faa220fa971ff73077fccd370", type: "transfer", isFeeOrRefund: false, @@ -1536,6 +1609,7 @@ describe("TransferService", () => { from: "0x08b222f412eb5d141fb32db443f2eed06ae65a24", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xeae0368e1457fa55da486ffc772cc654d3d5b95faa220fa971ff73077fccd370", type: "transfer", isFeeOrRefund: false, @@ -1550,6 +1624,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x2baec5bca9f2052489ed30668f27ab4466f0bcb3", + tokenType: TokenType.ERC20, transactionHash: "0xeae0368e1457fa55da486ffc772cc654d3d5b95faa220fa971ff73077fccd370", type: "transfer", isFeeOrRefund: false, @@ -1564,6 +1639,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x852a4599217e76aa725f0ada8bf832a1f57a8a91", + tokenType: TokenType.ERC20, transactionHash: "0xeae0368e1457fa55da486ffc772cc654d3d5b95faa220fa971ff73077fccd370", type: "transfer", isFeeOrRefund: false, @@ -1596,6 +1672,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0265d9a5af8af5fe070933e5e549d8fef08e09f4", tokenAddress: "0x2baec5bca9f2052489ed30668f27ab4466f0bcb3", + tokenType: TokenType.ERC20, transactionHash: "0x8ed4aa94bb4a28ce174e435d60297d765885dff83a543b49ad57adedec99cfe3", type: "transfer", isFeeOrRefund: false, @@ -1610,6 +1687,7 @@ describe("TransferService", () => { from: "0x0265d9a5af8af5fe070933e5e549d8fef08e09f4", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x8ed4aa94bb4a28ce174e435d60297d765885dff83a543b49ad57adedec99cfe3", type: "fee", isFeeOrRefund: true, @@ -1624,6 +1702,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0xbba0cf82ce98acd455bd34d7a53bb565a31372a6", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x8ed4aa94bb4a28ce174e435d60297d765885dff83a543b49ad57adedec99cfe3", type: "transfer", isFeeOrRefund: false, @@ -1638,6 +1717,7 @@ describe("TransferService", () => { from: "0xbba0cf82ce98acd455bd34d7a53bb565a31372a6", to: "0x65ebd487e692d688f2a36fb833729076dc85ed34", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x8ed4aa94bb4a28ce174e435d60297d765885dff83a543b49ad57adedec99cfe3", type: "transfer", isFeeOrRefund: false, @@ -1652,6 +1732,7 @@ describe("TransferService", () => { from: "0xbba0cf82ce98acd455bd34d7a53bb565a31372a6", to: "0xc9593dc3dcad5f3804aaa5af12a9d74d0c00e4b0", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x8ed4aa94bb4a28ce174e435d60297d765885dff83a543b49ad57adedec99cfe3", type: "transfer", isFeeOrRefund: false, @@ -1686,6 +1767,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xc36a1b2d19085fbeff652e618a1e61d6d386f92cbe51373eac60077bb128b7cb", type: "fee", isFeeOrRefund: true, @@ -1718,6 +1800,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x30e3abe6ac3a1b47d961213e1b1302377786f5cd537a6cd34dd3cd6473a319d0", type: "fee", isFeeOrRefund: true, @@ -1733,6 +1816,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x481e48ce19781c3ca573967216dee75fdcf70f54", tokenAddress: "0x4a80888f58d004c5ef2013d2cf974f00f42dd934", + tokenType: TokenType.ERC721, transactionHash: "0x30e3abe6ac3a1b47d961213e1b1302377786f5cd537a6cd34dd3cd6473a319d0", type: "mint", isFeeOrRefund: false, @@ -1765,6 +1849,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x4833645ed34e16c9e2ce4d26fee2d730202ab3e76c0cd155557e7bb9344990be", type: "fee", isFeeOrRefund: true, @@ -1797,6 +1882,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x6bedb809e97f58d987aea7aad4fcfa8a3f5ecc3cde9a97093b2f3a1a170692a0", type: "fee", isFeeOrRefund: true, @@ -1812,6 +1898,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0xd754ff5e8a6f257e162f72578a4bb0493c0681d8", tokenAddress: "0x89bcb56033920b8a654109faeb1f87e0c3358cad", + tokenType: TokenType.ERC721, transactionHash: "0x6bedb809e97f58d987aea7aad4fcfa8a3f5ecc3cde9a97093b2f3a1a170692a0", type: "transfer", isFeeOrRefund: false, @@ -1846,6 +1933,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0265d9a5af8af5fe070933e5e549d8fef08e09f4", tokenAddress: "0x2baec5bca9f2052489ed30668f27ab4466f0bcb3", + tokenType: TokenType.ERC20, transactionHash: "0x191c7e02d6a78b6da6116ea8347f3560627caa4b7fbf766f96eccbd09bacc433", type: "transfer", isFeeOrRefund: false, @@ -1860,6 +1948,7 @@ describe("TransferService", () => { from: "0x0265d9a5af8af5fe070933e5e549d8fef08e09f4", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x191c7e02d6a78b6da6116ea8347f3560627caa4b7fbf766f96eccbd09bacc433", type: "fee", isFeeOrRefund: true, @@ -1894,6 +1983,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x2b9153e896c0d2651d2826e8e1a447c5e56a3e060ae7d60c2c0bfbcd966e4880", type: "fee", isFeeOrRefund: true, @@ -1936,6 +2026,7 @@ describe("TransferService", () => { from: "0xd206eaf6819007535e893410cfa01885ce40e99a", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x8a7a99459d2278c83a8450cc36c0e5b75bee250a60e4b66dea182325afd8fa07", type: "fee", isFeeOrRefund: true, @@ -1971,6 +2062,7 @@ describe("TransferService", () => { from: "0x088282b61a8cc1014186076698e35bcc92e88b0d", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xb12a02697dd2a0e414cb8f9436c6fb7a8eb82eb403e256644235a0c618ef508d", type: "fee", isFeeOrRefund: true, @@ -1985,6 +2077,7 @@ describe("TransferService", () => { from: "0x0000000000000000000000000000000000000000", to: "0x7869cd51c2483169e1ce06fa6912e7d1e3bf629b", tokenAddress: "0x6267080b2265a09371cc2763756dbacdaf09856e", + tokenType: TokenType.ERC20, transactionHash: "0xb12a02697dd2a0e414cb8f9436c6fb7a8eb82eb403e256644235a0c618ef508d", type: "transfer", isFeeOrRefund: false, @@ -1999,6 +2092,7 @@ describe("TransferService", () => { from: "0x0000000000000000000000000000000000008001", to: "0x088282b61a8cc1014186076698e35bcc92e88b0d", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0xb12a02697dd2a0e414cb8f9436c6fb7a8eb82eb403e256644235a0c618ef508d", type: "refund", isFeeOrRefund: true, @@ -2025,6 +2119,7 @@ describe("TransferService", () => { timestamp: receivedAt, to: "0x76ff48d4bd33b4d5943bc82b8ee9ccaf079bcaaf", tokenAddress: "0x39c4bdfac23d10180e01c09bedfa0a508d4ad4d3", + tokenType: TokenType.ERC721, transactionHash: "0x52cdf727855ce9310b69a75d84fa23662d451e2dbcea64f3b277db12d78ab9ef", transactionIndex: 1, type: "mint", @@ -2039,6 +2134,7 @@ describe("TransferService", () => { timestamp: receivedAt, to: "0x38686aa0f4e8fc2fd2910272671b26ff9c53c73a", tokenAddress: "0x6dd28c2c5b91dd63b4d4e78ecac7139878371768", + tokenType: TokenType.ERC721, transactionHash: "0x52cdf727855ce9310b69a75d84fa23662d451e2dbcea64f3b277db12d78ab9ef", transactionIndex: 1, type: "mint", @@ -2053,6 +2149,7 @@ describe("TransferService", () => { timestamp: receivedAt, to: "0x48686aa0f4e8fc2fd2910272671b26ff9c53c73a", tokenAddress: "0x6dd28c2c5b91dd63b4d4e78ecac7139878371768", + tokenType: TokenType.ERC721, transactionHash: "0x52cdf727855ce9310b69a75d84fa23662d451e2dbcea64f3b277db12d78ab9ef", transactionIndex: 1, type: "transfer", @@ -2085,6 +2182,7 @@ describe("TransferService", () => { blockNumber: 7485644, amount: BigNumber.from("0x2386f26fc10000"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "deposit", isFeeOrRefund: false, isInternal: false, @@ -2099,6 +2197,7 @@ describe("TransferService", () => { blockNumber: 7485644, amount: BigNumber.from("0x2386f26fc10000"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "transfer", isFeeOrRefund: false, isInternal: false, @@ -2113,6 +2212,7 @@ describe("TransferService", () => { blockNumber: 7485644, amount: BigNumber.from("0x0141b56ff62900"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "fee", isFeeOrRefund: true, isInternal: false, @@ -2141,6 +2241,7 @@ describe("TransferService", () => { blockNumber: 7485644, amount: BigNumber.from("0x0141b56ff62900"), tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, type: "fee", isFeeOrRefund: true, isInternal: false, @@ -2168,6 +2269,7 @@ describe("TransferService", () => { from: "0x481e48ce19781c3ca573967216dee75fdcf70f54", to: "0x0000000000000000000000000000000000008001", tokenAddress: "0x000000000000000000000000000000000000800a", + tokenType: TokenType.ETH, transactionHash: "0x7ec71b1d5369b830af3f7af4b1ef0f04e62cc3775b1c090434a93493d1b68632", type: "fee", isFeeOrRefund: true,