Compile and deploy the example QRC20 to the QVM.
The QVM is Solidity-compatible. Compile with Qdock.io or solc to produce QVM bytecode:
# example with solc — output a .bin artifact
solc --bin --optimize -o build contracts/ExampleQRC20.solPoint COMPILED_BYTECODE_PATH in ../.env at the resulting .bin file
(default ./build/ExampleQRC20.bin).
Set QUANTOVA_DEPLOYER_KEY in .env to a testnet key funded from the faucet. Never commit
a real key — .env is gitignored.
npm run deploy:testnet../scripts/deploy.js will:
- Build a deployment transaction with
to = nulland your compiled bytecode (append ABI-encoded constructor args if your contract takes them). - Estimate gas with
q_estimateGasand read the chain id. - Sign locally with the
@quantovaSDK keyring (post-quantum key). - Broadcast with
q_sendRawTransactionand wait for the receipt, which contains the new contract address.
For safety the template stops before broadcasting until you wire in the real signed payload, so a misconfigured key cannot accidentally spend. The script prints the prepared transaction and the next step.
Treat the deployment as settled only after finality (~3s). Verify the deployed bytecode with
q_getCode against your compiled artifact.
When mainnet launches, set QUANTOVA_NETWORK=mainnet and the published endpoints; nothing else
in your code changes. Use keys held in secure custody for production deployments — see the
dev-checklist repository's pre-deployment and mainnet-readiness gates.