Skip to content

Commit

Permalink
fix: update evm_proxy implementation not lowercase()
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Nov 8, 2024
1 parent b95effa commit 917306a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/services/evm/evm_proxy.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ export default class EVMProxy extends BaseService {
public async detectEvmProxy(
ctx: Context<{ contractAddress: string }>
): Promise<EvmProxyHistory> {
const contractAddress = ctx.params.contractAddress.toLowerCase();
const proxyContractRPC = await this.contractHelper.isContractProxy(
ctx.params.contractAddress
contractAddress
);

if (!proxyContractRPC) {
Expand All @@ -51,7 +52,7 @@ export default class EVMProxy extends BaseService {

let evmProxyHistory!: EvmProxyHistory;
const proxyContract = await EVMSmartContract.query()
.findOne('address', ctx.params.contractAddress)
.findOne('address', contractAddress)
.withGraphJoined('evm_proxy_histories')
.orderBy('evm_proxy_histories.updated_at', 'desc');

Expand All @@ -71,8 +72,9 @@ export default class EVMProxy extends BaseService {

evmProxyHistory = await EvmProxyHistory.query()
.insert({
proxy_contract: ctx.params.contractAddress,
implementation_contract: proxyContractRPC.logicContractAddress,
proxy_contract: contractAddress,
implementation_contract:
proxyContractRPC.logicContractAddress?.toLowerCase(),
last_updated_height: currentBlock,
tx_hash: '',
})
Expand Down

0 comments on commit 917306a

Please sign in to comment.