Skip to content

Commit

Permalink
fix: evm proxy history object string
Browse files Browse the repository at this point in the history
  • Loading branch information
phamphong9981 committed Sep 6, 2024
1 parent 4819ed4 commit 0e73640
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/services/evm/crawl_evm_proxy_history.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,24 @@ export default class CrawlProxyContractEVMService extends BullableService {
// break;
default:
if (firstTimeCatchProxyEvent) {
implementationAddress = await this.contractHelper.isContractProxy(
evmEvent.address,
_.find(
EIPProxyContractSupportByteCode,
(value, __) => value.TYPE === evmEventProxy.type
)?.SLOT,
undefined,
bytecodes[evmEvent.address]
);
implementationAddress = (
await this.contractHelper.isContractProxy(
evmEvent.address,
_.find(
EIPProxyContractSupportByteCode,
(value, __) => value.TYPE === evmEventProxy.type
)?.SLOT,
undefined,
bytecodes[evmEvent.address]
)
)?.logicContractAddress;
}
break;
}

newJSONProxy.proxy_contract = _.toLower(evmEvent.address);
newJSONProxy.implementation_contract =
_.toLower(implementationAddress as string) || null;
_.toLower(implementationAddress as string | undefined) || null;
newJSONProxy.block_height = evmEvent.block_height;
newJSONProxy.tx_hash = evmEvent.tx_hash;
newJSONProxy.last_updated_height = lastUpdatedHeight;
Expand Down

0 comments on commit 0e73640

Please sign in to comment.