R2: How to Apply

R2 Beacon: APP_ID Registration Guide

Overview

This guide explains how to obtain an APP_ID for integrating your DApp with the R2 Beacon system during the pre-mainnet phase. The APP_ID is a unique identifier required for emitting business-aware actions to the R2 Beacon network.

Note: During the pre-mainnet phase, APP_ID registration is handled manually through direct communication with the R2 team. After mainnet launch, registration will be available through a self-service platform.

Prerequisites

Before starting the registration process, ensure you have:

  • A deployment-ready code

  • Documentation of your DApp's primary business actions

  • Technical documentation of your action structures

  • Development environment details (chains, networks, etc.)

Quick Start

  1. Prepare your technical documentation

  2. Contact R2 team at [email protected]

  3. Schedule an integration call

  4. Receive your APP_ID

  5. Implement R2 Beacon integration

Registration Process

1. Documentation Preparation

Prepare the following information in a structured format:

{
    "dapp_name": "Your DApp Name",
    "contract_addresses": {
        "ethereum_mainnet": "0x...",
        "polygon": "0x...",
        // Add other networks as applicable
    },
    "business_actions": [
        {
            "name": "PURCHASE_ITEM",
            "description": "User purchases an in-game item",
            "parameters": {
                "amount": "Purchase amount in native currency",
                "data": "ABI encoded: (uint256 itemId)"
            }
        }
        // Add other actions
    ],
    "technical_contact": {
        "name": "Technical Lead Name",
        "email": "[email protected]",
        "telegram": "@techhandle"
    }
}

2. Initial Contact

Send an email to [email protected] with:

  • Subject line: "APP_ID Registration Request - [Your DApp Name]"

  • Brief description of your DApp

  • Prepared technical documentation

  • Preferred communication method for follow-up

  • Your team's availability for integration call

3. Integration Call

During the scheduled call, you'll discuss:

  • Your DApp's architecture

  • Planned business actions

  • Integration timeline

  • Technical requirements

  • Security considerations

4. APP_ID Assignment

After approval, you'll receive:

  • Your unique APP_ID

  • Integration documentation

  • Test environment access

  • Support contact information

Implementation Steps

  1. Implement the R2BeaconEmitter contract:

import {R2BeaconEmitter} from "@roketo/r2beacon/contracts/R2BeaconEmitter.sol";

contract YourDApp is R2BeaconEmitter {
    constructor(bytes32 appId) R2BeaconEmitter(appId) {}
    
    // Your DApp implementation
}
  1. Deploy with your assigned APP_ID:

// Example deployment script
const APP_ID = "0x..."; // Your assigned APP_ID
const dapp = await YourDApp.deploy(APP_ID);
await dapp.deployed();

Post-Registration

After receiving your APP_ID:

  1. Implement the R2BeaconEmitter interface

  2. Test action emissions in the staging environment

  3. Submit test transactions for verification

  4. Receive approval for mainnet deployment

Future Platform Access

Note: After mainnet launch, the registration process will transition to a self-service platform at https://roke.to

The upcoming platform will provide:

  • Automated APP_ID generation

  • Self-service registration

  • Real-time action verification

  • Analytics dashboard

  • Integration monitoring

Common Issues & Solutions

1. Invalid APP_ID Format

Issue: APP_ID not recognized by R2 Beacon system

Solution: Verify APP_ID format:

// Correct format
bytes32 public constant APP_ID = 0x1234...;

// Incorrect format
bytes32 public constant APP_ID = "1234..."; // Will not work

2. Registration Email Not Received

Issue: No response to registration request

Solutions:

  • Check spam folder

  • Verify email sent to correct address: [email protected]

  • Visit https://roke.to for alternative contact methods

  • Include all required documentation in initial email

3. Action Emission Failures

Issue: Actions not appearing in R2 Beacon

Solution: Verify implementation:

// Correct
_emitR2Action(
    ACTION_ID,
    amount,
    abi.encode(parameters)
);

// Incorrect
_emitR2Action(
    "ACTION_ID", // Should be bytes32
    amount,
    parameters  // Should be ABI encoded
);

Warning: Never share your APP_ID credentials or private keys during the registration process. The R2 team will never ask for sensitive information through email or chat.

For additional support and information, visit https://roke.to or contact [email protected].

Last updated