I am learning solidity and developing a contract. The contract will have the external blockchain wallet address of users (mapped with their username) and this wallet will store NFTs uploaded on my contract. for example, i create my account in the contract and then minted an NFT. Now, this NFT is stored in my wallet. so, my question is - How to make a contract that would allow the user to connect their external wallet to my contract, mint an NFT and store it in their wallet?

2 Answers 2


That's not something that is handled by the smart contract in itself. Your smart contract would be connected to a dApp (a website, which serves as a graphical UI for the smart contract) and the dApp would be the one handling the connection, using libraries such as ethers.js or web3.js, look them up.


if you are working with remix ide you have to choose your environment (metamask wallet) and you can test it as you like in testnet networks. but if you are working on a dapp you can connect & use it there many frameworks(Hardhat) and libraries(web3.js, ethers.js ...)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.