Impersonate Metamask address

I know it is possible to impersonate an address as the web3 ethereum object doesn’t require private key verification to connect to Dapps.

I’m currently building a POC in which I would be able to connect to Dapps with a Smart Wallet so I am currently trying to impersonate a smart contract address using a simple Metamask fork.
It seems like there are securities in order to not be able to do it and changing the returned value in metamask-controller for ethAccounts is not enough.

Is there a way to do that?
Is there a smart wallet that already have this feature in which we could add a smart contract address into the wallet and then connect to Dapps using this wallet? (I saw Argent smart wallet but it seems to not have the possibility to add smart contract addresses, I also saw Metamonk which is a Metamask fork but very outdated and I didn’t manage to use it but it seems to be excactly what I would need for my POC)

Thank you!

1 Like

If anyone is able to help me even with only part of a solution it would be amazing! Thanks.

Hey @Alexo, welcome to the MetaMask community! :fox_face:

You will most likely be interested in MetaMask Flask to develop what you are trying to do.

Here is more information:

5 Likes

Hi Alexo, I am also looking to do the same and. Were you able to find the solution of impersonating an address using MetaMask flask build? Any help would be very helpful.
Thanks

Hi ibm, yes I succeeded to do it but on a MetaMask fork, I didnt use flask build. In case its still help you, you can make modifications in app/scripts/lib/rpc-method-middleware/handlers/eth-accounts.js and app/scripts/lib/rpc-method-middleware/handlers/request-accounts.js to either change the provider making requests or to change the displayed address. Good luck!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.