{"repo":"Web3Camp-Labs/hardhat-metamask-connector","free":true,"listed":false,"github":"https://github.com/Web3Camp-Labs/hardhat-metamask-connector","clone":"git clone https://github.com/Web3Camp-Labs/hardhat-metamask-connector.git","description":"Hardhat Metamask Connector is a tool to connect your metamask with your hardhat development environment, and let you say bye-bye to exposing your mnemonic or private key.","language":"TypeScript","stars":12,"topics":["development","ethereum","hardhat","metamask","privatekey","solidity","solidity-contracts"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"hardhat-metamask-connector Hardhat MetaMask Connector is a tool to connect your MetaMask wallet with your Hardhat development environment. Deploy and interact with smart contracts using your MetaMask wallet without exposing your mnemonic or private key in code. Features - Connect to MetaMask directly from Hardhat scripts - Deploy contracts using your MetaMask wallet - Sign transactions through MetaMask UI - Support for multiple networks (localhost, Polygon, Ethereum, etc.) - Automatic network switching - No private keys in code - ever! Install or Quick Start ⚠️ Important : You must call await signer.getAddress() after getting the signer. This is what triggers the browser to open and establishes the MetaMask connection! 1. Import the connector or 2. Basic Usage 3. Run your script How It Works 1. Initialize connector : new MetamaskConnector() creates a local web server (default port 8989) 2. Get signer : await connector.getSigner() returns a signer object 3. Trigger browser : await signer.getAddress() opens the browser and waits for MetaMask connection 4. Connect MetaMask : Click \"Connect to MetaMask\" in the browser and approve the connection 5. Network switch : MetaMask automatically switches to the correct network 6. Sign transactions : Approve transactions in MetaMask as they come 7. Script continues : Your Hardhat script receives the signed transactions Important : You must call await signer.getAddress() before using the signer. This triggers the browser to open and establi","default_branch":null,"files":null,"tree":[],"storefront":"/r/Web3Camp-Labs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Web3Camp-Labs/hardhat-metamask-connector/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}