Skip to content

Commit

Permalink
fix: fix duplicate contract when call create contract in proxy history
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Nov 11, 2024
1 parent eeda9c2 commit c567761
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/services/evm/crawl_evm_proxy_history.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ export default class CrawlProxyContractEVMService extends BullableService {
BULL_JOB_NAME.INSERT_ERC20_CONTRACT,
BULL_JOB_NAME.INSERT_ERC20_CONTRACT,
{
evmSmartContracts: erc20ProxyContracts,
evmSmartContracts: [
...new Map(
erc20ProxyContracts.map((item) => [item.address, item])
).values(),
],
},
{
removeOnComplete: true,
Expand Down Expand Up @@ -297,7 +301,11 @@ export default class CrawlProxyContractEVMService extends BullableService {
BULL_JOB_NAME.INSERT_ERC721_CONTRACT,
BULL_JOB_NAME.INSERT_ERC721_CONTRACT,
{
evmSmartContracts: erc721ProxyContracts,
evmSmartContracts: [
...new Map(
erc721ProxyContracts.map((item) => [item.address, item])
).values(),
],
},
{
removeOnComplete: true,
Expand Down

0 comments on commit c567761

Please sign in to comment.