docs: add MetaMask request info (#2535).

This commit is contained in:
Richard Moore 2022-02-03 15:28:04 -05:00
parent 3df0e06c64
commit 4935f93015

View File

@ -88,6 +88,9 @@ _code: Connecting to MetaMask @lang<script>
// what MetaMask injects as window.ethereum into each page
const provider = new ethers.providers.Web3Provider(window.ethereum)
// MetaMask requires requesting permission to connect users accounts
await provider.send("eth_requestAccounts", []);
// The MetaMask plugin also allows signing transactions to
// send ether and pay to change state within the blockchain.
// For this, you need the account signer...