bcnmy / userop-debugger-backend

MIT License
7 stars 2 forks source link

Add getEntryPointContractInstance function in service-manager #41

Open kanthgithub opened 9 months ago

kanthgithub commented 9 months ago

Background

Query on EntryPoint contract needs to load its contract instance from EPAddress, Ep-ABI and provider on a given chainId

Change Proposal

Add a function getEntryPointContractInstance in service-manager.ts maintain a map with key as networkId and value as EPContractInstance

const epContractInstanceMap = new Map<string, ethers.Contract>();
kanthgithub commented 9 months ago

added new function in commit https://github.com/bcnmy/userop-debugger-backend/pull/40/commits/5a0fab5d08b86db0d2312ea9f51e98bd667ef1ed#diff-6095566393d6764755da9f6e05403db6b07857c824940eb56688a9add1a67f49R79-R81

@tomarsachin2271

tomarsachin2271 commented 8 months ago

This calls for creation on EntryPoint service class under service/entry-point directory. Where the service class can have EP instance using viem client and relevant methods like getAccountNonce which will call the EP methods on chain.