Skip to content

Get Building

Realms.World L3 works the same as Starknet, with a key difference: The Fee Token.

Fee Token - $LORDS

The designated fee token in the world is the Lords Token, which means you will need to have some of these Lords available in order to develop on the network.

You must have this in your balance to deploy a contract, call a contract, or do anything on the network.

The Fee Token Architecture

The Lords token on the network is a dojo-specific ERC20 token. This allows us to use the token natively within the Dojo framework! Pretty slick...

Create an Account and Get Some Lords

We will be doing four steps to get started developing on the Realms.World L3 network.

  1. Create Account Details
  2. Get some Lords from the Faucet
  3. Deploy Account
  4. Set up your Scarb.toml

1. Create Account Details

There are many ways to create an account on a Starknet network, and the ability to do this will be baked into the Dojo CLI framework. However, as of this writing, this is not available, so we need to use a script to do this.

Clone this scripts repo here.

Note: You will need to install bun in order to run these scripts.

Run the script, and it will generate Account details for you in the .env file.

bun run create

2. Get some Lords from the Faucet

Head to Realms World faucet and paste in your account address from the previous step and it will send you some Lords!

2a. Confirm your balance

You can confirm your balance by:

bun run balance

3. Deploy Account

Now that you have some Lords in your account, you can deploy your account to the network.

bun run deploy

4. Setup your Scarb.toml

You will need to setup your Scarb.toml file to point to the Realms.World L3 network.

[package]
cairo-version = "2.4.0"
name = "realms_world"
version = "0.5.1"
 
[cairo]
sierra-replace-ids = true
 
[dependencies]
dojo = { git = "https://github.com/dojoengine/dojo", tag = "v0.5.1" }
 
[[target.dojo]]
 
[tool.dojo]
initializer_class_hash = "0xbeef"
 
[tool.dojo.env] 
rpc_url = "https://api.cartridge.gg/x/realms/katana/"
 
# Your details you just created
account_address = "<>"
private_key = "<>"
 
# World address (optional if you want to deploy to the cannonical world)
world_address = "<>"

5. Deploy!

Now you can deploy! Use the dojo cli to deploy your contract to the network.

sozo migrate

Success! You have deployed your first contract to the Realms.World L3 network.

Next Steps

Now get building and join the Realms Discord to get help and share your progress!