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.
@@ -179,23 +179,23 @@ And for the case when you did not add the private key early, and so the `from` w
179
179
180
180
```typescript
181
181
asyncfunction sendTransaction() {
182
-
const web3 =newWeb3('http://localhost:8545');
182
+
const web3 =newWeb3('http://localhost:8545');
183
183
184
-
// The method web3.eth.sendTransaction is helpful if you are using a browser-injected provider like metamask.
185
-
// Or, if you are using a local dev node like ganache; and you have some accounts already unlocked at the node.
186
-
// And this is how you would get the first unlocked account from a local node (not advised for production or even on test node to use unlock accounts on the node).
187
-
const account = (awaitweb3.eth.getAccounts())[0];
184
+
// The method web3.eth.sendTransaction is helpful if you are using a browser-injected provider like metamask.
185
+
// Or, if you are using a local dev node like ganache; and you have some accounts already unlocked at the node.
186
+
// And this is how you would get the first unlocked account from a local node (not advised for production or even on test node to use unlock accounts on the node).
187
+
const account = (awaitweb3.eth.getAccounts())[0];
188
188
189
-
// Alternative to the above, here is how to add wallet to be used as a signer later:
0 commit comments