Deploy a Solidity contract to StableNet Testnet using Hardhat and verify it on the Explorer.
What you’ll learn
By the end of this tutorial, you’ll be able to:- Configure Hardhat and
hardhat.config.jsfor StableNet Testnet - Deploy a WKRC payment contract using a Hardhat deploy script
- Verify the deployment on the StableNet Explorer
Prerequisites
- Node.js ≥ 18 — run
node --versionto check - Testnet WKRC from the Faucet
Create a Hardhat project
Configure hardhat.config.js
Replace the contents ofhardhat.config.js:
Write WKRCPayment.sol
Delete the placeholder and createcontracts/WKRCPayment.sol:
Write the deploy script
Createscripts/deploy.js:
Deploy to Testnet
Block inclusion can take up to 1–2 minutes. If
waitForDeployment() appears to hang, the transaction is already in the mempool. Do not cancel and retry — that may cause a nonce conflict.Verify on Explorer
Open explorer.stablenet.network and search for your contract address. You should see aContract Creation transaction with status Success.
Next steps
Deploy with Foundry
Deploy the same contract using Foundry’s
forge and cast.Listen to Events
Subscribe to on-chain events with WebSocket.
RPC API Reference
Full list of supported JSON-RPC methods.
Fee Delegation
Let a separate account pay gas for your users.

