You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
@@ -96,17 +96,33 @@ As stated above, the injected provider should be in compliance with [EIP-1193](h
96
96
97
97
The web3.js 4.x Provider specifications are defined in [web3 base provider](https://github.com/ChainSafe/web3.js/blob/4.x/packages/web3-types/src/web3_base_provider.ts) for Injected Providers.
98
98
99
-
```ts
100
-
const Web3 =require('web3');
101
-
// Using an EIP1193 provider like MetaMask can be injected
// If web3 is not available, give instructions to install MetaMask
117
+
document.getElementById('log').innerHTML=
118
+
'Please install MetaMask to connect with the Ethereum network';
119
+
}
120
+
});
121
+
</script>
108
122
```
109
123
124
+
Note that the above code should be hosted in a web server (that could be a simple local web server), because many browser does not support this feature for static files located on your machine.
125
+
110
126
### Provider Options
111
127
112
128
There are differences in the objects that could be passed in the Provider constructors.
0 commit comments