
{"id":154661,"date":"2026-04-23T05:34:17","date_gmt":"2026-04-23T05:34:17","guid":{"rendered":"https:\/\/mycryptomania.com\/?p=154661"},"modified":"2026-04-23T05:34:17","modified_gmt":"2026-04-23T05:34:17","slug":"how-to-enhance-your-app-with-oasis-rofl-a-quickstart-tutorial","status":"publish","type":"post","link":"https:\/\/mycryptomania.com\/?p=154661","title":{"rendered":"How To Enhance Your App With Oasis ROFL: A QuickStart Tutorial"},"content":{"rendered":"<p>I have mentioned the Oasis ROFL (runtime off-chain logic) framework on several occasions. For most people, this <a href=\"https:\/\/www.youtube.com\/watch?v=JFYnEyMFgRE\">explainer video<\/a> would be enough. But for developers and dApp builders, who want to try things out themselves, a deeper dive is worth it. In this guide, I will give a quick introduction to ROFL and then share a QuickStart tutorial to help build a ROFL-powered app.<\/p>\n<h3>ROFL in a\u00a0nutshell<\/h3>\n<p>The ROFL architecture consists of these distinct components: the hardware, the application, the remote attestation, the blockchain layers, and user interaction.<\/p>\n<p>Further, this 5-part process lays out how ROFL\u00a0works.<\/p>\n<p>From a developer\u2019s perspective, ROFL-powered apps run on Oasis nodes inside a Trusted Execution Environment (TEE), managed through the protocol\u2019s unique production-ready EVM runtime\u200a\u2014\u200aSapphire.<\/p>\n<p>When you use ROFL, you get the following support:<\/p>\n<p><strong>Docker-like containers<\/strong> or <strong>single executable apps<\/strong>, based on what Trusted Compute Base (TCB) you are using, and what your threat model\u00a0isIntel SGX\/TDX ensures <strong>privacy and integrity<\/strong>, and also provides a full update history and auditabilityYour app is registered, managed, and deployed on a permissionless pool of ROFL nodes, which means it is <strong>not censorable<\/strong>There is a <strong>built-in Key Management Service<\/strong> (KMS) that stores your app\u2019s secrets as well as secures key derivation inside the\u00a0TEEVerifiable ROFL transactions originating from <strong>integration with Oasis Sapphire<\/strong> that enable EVM-compatible confidential smart contracts<\/p>\n<p>Moreover, you don\u2019t need to build from scratch\u200a\u2014\u200ayou can just wrap your existing app into a ROFL-powered app. Let\u2019s see\u00a0how.<\/p>\n<h3>QuickStart<\/h3>\n<p>There are 5 steps to enhance an app with ROFL\u00a0power:<\/p>\n<p><strong>Initialize<\/strong> the ROFL\u00a0manifest<strong>Create<\/strong> a new app on blockchain<strong>Build<\/strong> a ROFL\u00a0bundleEncrypt <strong>secrets<\/strong> and store them\u00a0on-chain<strong>Deploy<\/strong> your app on a ROFL\u00a0node<\/p>\n<h3>Prerequisites<\/h3>\n<p><strong>Containerized App<\/strong><br \/> First thing you need is a containerized app with a downloadable Docker-like image. Any public Open Container Initiative (OCI) repository works; however, you might like to choose from <a href=\"https:\/\/docker.io\/\">Docker<\/a> or <a href=\"https:\/\/docs.github.com\/en\/packages\/working-with-a-github-packages-registry\/working-with-the-container-registry\">GitHub container registry<\/a>.<\/p>\n<p>If your app is not already running inside a container and you don\u2019t know how, follow this <a href=\"https:\/\/docs.oasis.io\/build\/rofl\/workflow\/containerize-app\/\">step-by-step mini tutorial<\/a>.<\/p>\n<p><strong>Oasis CLI<\/strong><br \/> Next, you need the latest version of the Oasis Command Line Interface (CLI). Install it from\u00a0<a href=\"https:\/\/docs.oasis.io\/build\/tools\/cli\/setup\">here<\/a>.<\/p>\n<p><strong>Tokens<\/strong><br \/> Lastly, you will need about <strong>150 tokens<\/strong> to cover ROFL registration, renting a machine, and paying for the gas\u00a0fees.<\/p>\n<p>Now, you can either create a new account or import an existing one. Let\u2019s check out both processes.<\/p>\n<p>oasis wallet create my_account &#8211;file.algorithm secp256k1-bip44<\/p>\n<p>Later, you can choose to import this account to Metamask or other Ethereum-compatible tooling, e.g.,\u00a0Hardhat.<\/p>\n<p><strong>Import an existing account<\/strong> -&gt; <br \/> You need to export the <strong>secp256k1<\/strong> private key or mnemonic from your existing wallet before running this\u00a0command:<\/p>\n<p>oasis wallet import my_account<\/p>\n<p><strong>Note<\/strong>: If you are working in a test environment, you can get free testnet tokens from the official <a href=\"https:\/\/faucet.testnet.oasis.io\/\">faucet<\/a>. <br \/> If you are building on the mainnet, you will need to <a href=\"https:\/\/docs.oasis.io\/general\/manage-tokens\/#get-rose\">buy ROSE<\/a>\u00a0tokens.<\/p>\n<h3>Initialize<\/h3>\n<p>This is the first step. You start by running <a href=\"https:\/\/docs.oasis.io\/build\/tools\/cli\/rofl#init\"><strong>oasis rofl init<\/strong><\/a> using <strong>compose.yaml<\/strong> inside your app folder. This will generate the ROFL manifest in the form of <strong>rofl.yaml<\/strong>.<\/p>\n<p>oasis rofl init<\/p>\n<p>Now, based on your requirement, you can change the <strong>memory<\/strong>, specify the number of <strong>cpus<\/strong>, and the root filesystem <strong>storage<\/strong> section that comes under <strong>resources<\/strong>.<\/p>\n<p><strong>rofl.yaml<\/strong><\/p>\n<p>name: my-app<br \/>version: 0.1.0<br \/>tee: tdx<br \/>kind: container<br \/>resources:<br \/>  memory: 512 # in megabytes<br \/>  cpus: 1<br \/>  storage:<br \/>    kind: disk-persistent<br \/>    size: 512 # in megabytes<br \/>artifacts:<br \/>  firmware: https:\/\/github.com\/oasisprotocol\/oasis-boot\/releases\/download\/v0.6.2\/ovmf.tdx.fd#db47100a7d6a0c1f6983be224137c3f8d7cb09b63bb1c7a5ee7829d8e994a42f<br \/>  kernel: https:\/\/github.com\/oasisprotocol\/oasis-boot\/releases\/download\/v0.6.2\/stage1.bin#e5d4d654ca1fa2c388bf64b23fc6e67815893fc7cb8b7cfee253d87963f54973<br \/>  stage2: https:\/\/github.com\/oasisprotocol\/oasis-boot\/releases\/download\/v0.6.2\/stage2-podman.tar.bz2#b2ea2a0ca769b6b2d64e3f0c577ee9c08f0bb81a6e33ed5b15b2a7e50ef9a09f<br \/>  container:<br \/>    runtime: https:\/\/github.com\/oasisprotocol\/oasis-sdk\/releases\/download\/rofl-containers%2Fv0.8.0\/rofl-containers#08eb5bbe5df26af276d9a72e9fd7353b3a90b7d27e1cf33e276a82dfd551eec6<br \/>    compose: compose.yaml<\/p>\n<h3>Create<\/h3>\n<p>The next step is to create a new app on-chain. You can use the <a href=\"https:\/\/docs.oasis.io\/build\/tools\/cli\/rofl#create\"><strong>oasis rofl create<\/strong><\/a> command for this.<br \/> Please note that any newly created app in this process is registered by default on the Sapphire mainnet. If you are using a test environment, you will need to change the setting. So, you will be required to pass<strong>\u200a\u2014\u200anetwork testnet<\/strong> parameter.<\/p>\n<p>oasis rofl create &#8211;network testnet<\/p>\n<p>The check whether this transaction was successful is to find your app on the <a href=\"https:\/\/explorer.oasis.io\/testnet\/sapphire\/rofl\/app\">Oasis Explorer<\/a>.<\/p>\n<h3>Build<\/h3>\n<p>In this step, we will build the ROFL\u00a0bundle.<\/p>\n<p>oasis rofl build<\/p>\n<p>This command results in the generation of a new\u00a0.orc file inside your project\u00a0folder.<\/p>\n<h3>Secrets<\/h3>\n<p>This is the step where privacy is enforced. So, if there are environment variables that your app is using, you can store them on-chain privately using the <a href=\"https:\/\/docs.oasis.io\/build\/tools\/cli\/rofl#secret\"><strong>oasis rofl secret<\/strong><\/a> command. It would look like\u00a0this:<\/p>\n<p>echo -n &#8220;my-secret-token&#8221; | oasis rofl secret set TOKEN &#8211;<\/p>\n<p>This command populates the <strong>TOKEN<\/strong> secret. You can now use it in your compose file like this:<br \/><strong>compose.yaml<\/strong><\/p>\n<p>services:<br \/>  python-telegram-bot:<br \/>    build: .<br \/>    image: &#8220;ghcr.io\/oasisprotocol\/demo-rofl-tgbot:ollama&#8221;<br \/>    platform: linux\/amd64<br \/>    environment:<br \/>      &#8211; TOKEN=${TOKEN}<\/p>\n<p>If you want to submit the secrets and the ROFL bundle information on-chain, you can do so with the <a href=\"https:\/\/docs.oasis.io\/build\/tools\/cli\/rofl#update\"><strong>oasis rofl update<\/strong><\/a>\u00a0command.<\/p>\n<p>oasis rofl update<\/p>\n<h3>Deploy<\/h3>\n<p>This is the final step of the process. Here, you use the <a href=\"https:\/\/docs.oasis.io\/build\/tools\/cli\/rofl#deploy\"><strong>oasis rofl deploy<\/strong><\/a> command so that your app gets deployed to a ROFL provider.<\/p>\n<p>oasis rofl deploy<\/p>\n<p>The command triggers the bootstrapping of a new machine that fits the required resources provided by Oasis. You can check the status of the machine using the <a href=\"https:\/\/docs.oasis.io\/build\/tools\/cli\/rofl#machine-show\"><strong>oasis rofl machine show<\/strong><\/a>\u00a0command.<\/p>\n<p>Oasis rofl machine show<\/p>\n<p>You can now also check your application logs to verify how everything works. You will need the <a href=\"https:\/\/docs.oasis.io\/build\/tools\/cli\/rofl#machine-logs\"><strong>oasis rofl machine logs<\/strong><\/a> command for\u00a0this.<\/p>\n<p>oasis rofl machine logs<\/p>\n<p><strong>Parting words<\/strong><\/p>\n<p>If you are a developer who likes the hands-on approach, I hope you had a good time trying out this tutorial and successfully deploying your first ROFL-powered app. <br \/> You will note that in this guide, I have provided several links to the Oasis documentation instead of elaborating on\u00a0them.<\/p>\n<p>containerize your\u00a0applatest Oasis CLI\u00a0releaseoasis rofl\u00a0initoasis rofl\u00a0createoasis rofl\u00a0secretoasis rofl\u00a0updateoasis rofl\u00a0deployoasis rofl machine\u00a0showoasis rofl machine\u00a0logs<\/p>\n<p>That\u2019s because I wanted to focus on the topic here without going into details on these commands, which require separate attention, and I will prepare other tutorials explaining them later\u00a0on.<\/p>\n<p>For a quick chat with the Oasis engineering team for help with specific issues, you can drop your comments in the <strong>dev-central channel<\/strong> in the official\u00a0<a href=\"https:\/\/discord.com\/invite\/BQCxwhT5wS\">Discord<\/a>.<\/p>\n<p><em>Originally published at <\/em><a href=\"https:\/\/dev.to\/dc600\/how-to-enhance-your-app-with-oasis-rofl-a-quickstart-tutorial-3n55\"><em>https:\/\/dev.to<\/em><\/a><em> on April 22,\u00a02026.<\/em><\/p>\n<p><a href=\"https:\/\/medium.com\/coinmonks\/how-to-enhance-your-app-with-oasis-rofl-a-quickstart-tutorial-e0eaf729c1be\">How To Enhance Your App With Oasis ROFL: A QuickStart Tutorial<\/a> was originally published in <a href=\"https:\/\/medium.com\/coinmonks\">Coinmonks<\/a> on Medium, where people are continuing the conversation by highlighting and responding to this story.<\/p>","protected":false},"excerpt":{"rendered":"<p>I have mentioned the Oasis ROFL (runtime off-chain logic) framework on several occasions. For most people, this explainer video would be enough. But for developers and dApp builders, who want to try things out themselves, a deeper dive is worth it. In this guide, I will give a quick introduction to ROFL and then share [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":154662,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-154661","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interesting"],"_links":{"self":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts\/154661"}],"collection":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=154661"}],"version-history":[{"count":0,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts\/154661\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/media\/154662"}],"wp:attachment":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=154661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=154661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=154661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}