I am trying to build a chrome extension as a crypto wallet. I spent a lot of time on how to inject something to window.ethereum object. Something like window.ethereum = "hello_world". So that when I go to any tab in chrome and if I execute window.ethereum in devtools console, I should see "hello_world" string as output.
It feels like simple thing. But I am stuck here. Please help on this.
Give me the code with these files:
- chrome extension's popup.html
- contentScript.html
- background.js
- manifest.json