RADIX WikiRADIX Wiki

Overview

Once you've tested locally with resim, the next step is deploying to the public Stokenet testnet. The process is the same for Mainnet — the only difference is you use real XRD.

Stokenet vs Mainnet

Always deploy and test on Stokenet first. Stokenet XRD is free and has no value. Never send Mainnet XRD to Stokenet addresses.

1. Get Test XRD

Open the Radix Wallet and switch to the Stokenet network. Use the built-in faucet to request free test XRD — you'll need it to pay transaction fees for deployment.

2. Build Your Package

scrypto build

Your compiled WASM file is at:

target/wasm32-unknown-unknown/release/<package_name>.wasm

The build also generates an RPD (Radix Package Definition) file at the same location, which describes your blueprints and their interfaces.

3. Deploy via Developer Console

  1. Go to console.radixdlt.com/deploy-package and select Stokenet in the network selector
  2. Click "Connect" in the top-right and connect your Radix Wallet
  3. Upload your .wasm and .rpd files
  4. Review the auto-generated transaction manifest
  5. Click "Send to Wallet" and approve the transaction in your wallet

Once confirmed, the console displays your package address. Save it — you'll need it to instantiate components.

4. Instantiate a Component

Go to the "Send Raw Transaction" section of the console and submit a manifest that calls your instantiation function:

CALL_FUNCTION
  Address("<PACKAGE_ADDRESS>")
  "GumballMachine"
  "instantiate"
  Decimal("5")
;
 
CALL_METHOD
  Address("<YOUR_ACCOUNT>")
  "deposit_batch"
  Expression("ENTIRE_WORKTOP")
;

The resulting component address is your live dApp on Stokenet.

Deploying to Mainnet

The process is identical — use console.radixdlt.com instead and ensure your wallet is on Mainnet with real XRD for fees.

Royalties

Before deploying to Mainnet, consider setting package royalties to earn XRD whenever others use your blueprints.

Next Steps