HardHat
Last updated
Last updated
💡 New to Hardhat? Check out the for basics.
1. Configure Your Account
To deploy contracts to UOMI networks, you'll need to export your private key from MetaMask:
Open MetaMask
Select your account
Click the three dots menu
Go to "Account Details"
Select "Export Private Key"
Enter your password to confirm
You'll get a 64-character hex string like:
2. Store Your Private Key
Create private.json
in your project root:
⚠️ Security Warning Never commit your private key to version control. Add
private.json
to your.gitignore
file.
3. Configure Networks
Modify your hardhat.config.js
:
4. Deploy Your Contract
Install the HD Wallet Provider:
Modify your truffle-config.js
:
Deploy to your chosen network:
💡 Note If no network is specified, Truffle will use the default development network.