Deploying IDApps Made Effortless: Experience the Magic of Router Sandbox

Router Protocol
9 min readJul 12, 2023

--

In the rapidly evolving world of decentralized applications (Dapps), building and deploying even testnet applications across multiple blockchain networks can be a complex and time-consuming process. Developers often face challenges such as obtaining testnet funds, programming the cross-chain functionality, and deploying their applications. However, with the introduction of Router Sandbox, these hurdles are a thing of the past. Router Sandbox is an intuitive prototyping environment that simplifies the compilation, deployment, and interaction with sample IDApps (interoperable Dapps) across multiple chains.

In the following sections of this article, we will understand the overall working of Router Sandbox, followed by a discussion of the features offered by Router Sandbox. In drawing this article to a close, we will take a look at how to use Router Sandbox and claim a POAP NFT for the same.

End-to-end Working

Before understanding the end-to-end working of Router Sandbox, let us first understand the steps involved in deploying any testnet IDApp using Router:

Step 1) Setting up a wallet on multiple chains and sourcing respective testnet funds to interact with the testnets.

Step 2) Writing and compiling smart contracts with all the relevant functions, including iSend (to send a request to the destination chain), iReceive (to handle a request received from the source chain) and iAck (to handle an acknowledgement received from the destination chain).

Step 3) Deploy the compiled smart contracts on all the required chains. For example, if you want your application to be live on Fuji, Mumbai and Arbitrum Goerli, you’ll have to deploy your contracts on all these three chains.

Step 4) [Optional] Verifying your contracts to allow for interaction with the contract directly from the relevant block explorer.

Step 5) Setting the fee payer address for each contract. The fee associated with any cross-chain request initiated by a dApp is paid by the dApp’s corresponding fee-payer account on the Router chain. This fee-payer account need to be set by the dApp deployers for all the integrated chains and can be changed anytime. The fee-payer account on the Router chain also has to approve the dApp’s request to be its fee-payer (to prevent dApp deployers from unilaterally setting any random account as their fee-payer account).

Step 6) Performing a test transaction from one chain to another as a sanity check.

With Router Sandbox, we have abstracted all the steps mentioned above into a one-click platform wherein the user can deploy their IDApps by merely choosing the type of IDApp they want to deploy and configuring the chains where they want their IDApp. Behind the scenes, Router Sandbox:

  1. generates a random wallet using ethers.wallet.createRandom() and sends some native testnet tokens to that wallet (on the chains selected by the user);
  2. depending on the user selection, deploys one of our preprogrammed and compiled contracts with the required constructor parameters (including the fee payer address) — PingPong.sol, XERC20.sol (cross-chain ERC20), XERC1155.sol or XERC721.sol (cross-chain NFTs);
  3. verifies the contract on the respective chain’s block explorer;
  4. approves the fee-payer request on behalf of the fee-payer account on the Router chain;
  5. executes a test transaction on behalf of the user on the newly deployed IDApp;

Note: To prevent sybil attacks on Router Sandbox, we have limited the number of requests from any IP address to 5 per day.

Features

Intuitive UI

A key strength of Router Sandbox lies in its intuitive user interface. The platform is designed to be user-friendly, making it accessible to Web 3.0 users of all levels of expertise. Whether you’re a seasoned developer or new to the world of decentralised applications, Router Sandbox’s intuitive design and straightforward functionality ensure that you can easily navigate and utilise the platform without extensive technical knowledge. If you still have any trouble using the platform, feel free to refer to our guide on using Router Sandbox given here.

One-Click Deployment

Router Sandbox eliminates the complexities of deploying IDApps by offering a one-click deployment feature. Users can choose the IDApp they want to deploy and select the chains where they should be deployed. With just one click, Router Sandbox automatically handles the deployment process, providing users with a ready-to-use cross-chain application. This streamlined approach saves considerable time and effort for users to test out the capabilities of the Router chain.

Support for Multiple Chains

Router Sandbox supports multiple testnet networks, including Fuji (Avalanche), Mumbai (Polygon), Arbitrum Goerli, Mantle Ringwood Testnet, and Scroll Testnet. In addition to these chains, Router Sandbox is committed to expanding its chain support and ensuring compatibility with new and emerging blockchain networks.

Multiple IDApps to Choose From

Router Sandbox offers users the flexibility to choose from various IDApps based on their requirements. Currently, users can deploy the following applications:

  1. Cross-chain Ping Pong: This application allows users to send a message (ping) from the source chain to the destination chain and receive an acknowledgement (pong) back on the source chain. It demonstrates the seamless communication between different blockchain networks.
  2. Cross-chain ERC20: An ERC20 token with built-in cross-chain transfer capabilities. This IDApp showcases the interoperability of tokens across multiple chains, enabling users to transfer assets seamlessly.
  3. Cross-chain NFT (ERC721 or ERC1155): This IDApp enables the creation and transfer of non-fungible tokens (NFTs) across different blockchain networks. Users can experience the cross-chain functionality of NFTs and explore their potential in various use cases.

Transparency

Router Sandbox understands the importance of transparency in the development and deployment process. To provide users with a clear understanding of the workflow, Router Sandbox offers a step-by-step view of the entire process. From setting up an account with testnet funds to deploying a cross-chain application and verifying the contracts, users have full visibility into each stage of the journey. This transparency facilitates a deeper understanding of the intricacies of cross-chain dApp development.

Figure 1. A Step-by-step View of the Entire Sandbox Process

Additionally, all transactions executed in the Sandbox environment are visible in a separate “Transactions” section with their summary and respective block explorer links.

Figure 2. A Dedicated Section to View all the Relevant Transactions

How to use Router Sandbox and Claim your POAP NFT?

Note that the guide given below is for those with little to no experience with decentralised applications. If you have sufficient experience in using dApps, you’ll be able to navigate Router Sandbox with a lot of ease.

Step 1) Go to this link. You should see the following screen:

Figure 3. Router Sandbox UI

Step 2) Fill the required fields and click on “Execute -

  1. Username: Enter a username of your choice
  2. Chains: Select a minimum of two chains and a maximum of three. Currently, we support 5 testnets — Fuji (Avalanche), Mumbai (Polygon), Arbitrum Goerli, Mantle Ringwood Testnet, and Scroll Testnet.
  3. Environment: Currently, we only support the testnet environment.
  4. Contract: Select the dApp you want to deploy. You can choose either one of the following — Ping Pong, XERC20, XERC721, or XERC1155.

Important Notes:

  1. Username doesn’t need to be unique.
  2. Network selection is limited to a maximum of three to limit delays associated with contract deployment and verification.

Step 3) Once you click on “Execute”, you should start seeing all the steps involved in the execution of Router Sandbox.

Note: You can also check out all of the transactions executed in the Sandbox environment under the “Transactions” section. By clicking on the transaction hash, you can see the detailed view of your transaction on the respective network’s block explorer.

Step 4) [Optional] You can download the private key for the wallet created for you as part of the Sandbox execution.

Figure 4. Downloading your Private Key

Note: You can import the private key in your MetaMask wallet and use the account to play around with the deployed dApps later. However, we strongly advise you not to use this account for any other purposes.

Step 5) [Optional] Once your contracts are deployed and verified, you’ll see a “Share on Twitter” button. If you liked using Router Sandbox, do share your experience on Twitter and tag us @routerprotocol.

Figure 5. Sharing your Experience on Twitter

Once you click this button, you’ll be redirected to Twitter with a standard tweet template. Please feel free to edit it.

Important Notes:

  1. If you want to claim a Sandbox POAP NFT, then this is a required step.
  2. If you selected Ping Pong while using Sandbox, we will also generate a custom UI for your IDApp and provide its URL. You can visit this URL to interact with your application directly.
  3. After tweeting about Router Protocol, you can click on the “Claim your NFT” button to mint your NFT.

Step 6) [Optional] Post the deployment of contracts, Sandbox will execute a transaction on your behalf. After the successful execution of the transaction, a “Claim your NFT” modal will pop up. Fill in the relevant details and click on “Claim your NFT” -

  1. Tweet URL: The URL of your tweet talking about Router Sandbox
  2. Recipient Address: EVM Wallet address to which the NFT will be minted
Figure 6. Entering your Details to Claim the Sandbox NFT

Important Notes:

  1. Only 1 NFT will be minted against a Twitter account; i.e., multiple tweets from the same account will not be considered.
  2. Only 1 NFT will be minted to any wallet address.
  3. Make sure that your tweet talks about your experience using Router Sandbox since we validate all the submitted tweets.
  4. After you submit the aforementioned details, it will take 15–30 minutes for us to validate your tweet and mint your NFT.

Step 7) [Optional] If your details are submitted successfully, you should be able to see your NFT in your Router account in 15–20 minutes. To check if you have received your NFT, follow these steps:

  • Step 7.1) Go to Router Explorer and paste your recipient address in the search box.
Figure 7. Router Explorer

Step 7.2) You can view your NFTs by clicking on the “CW-721 Tokens” toggle.

Figure 8. Viewing your CW-721 Tokens

If your NFT has been minted, you will see “Router Sandbox POAP” as one of the listed NFTs.

Figure 9. Sandbox POAP NFT in the List of CW-721 Tokens

If you don’t see your Sandbox NFT listed here, wait for a few minutes and then check again.

Future Work

In its current state, Router Sandbox is still a very rudimentary application. In the future, we plan to convert it into a full-fledged prototyping application by adding support for:

  1. Non-EVM chains like Near, and Solana, among others;
  2. MetaMask and other Web3 wallets allow contract deployments directly from users’ personal accounts;
  3. compiling and deploying custom contracts (besides the template contracts like Ping Pong, XERC20, etc.);
  4. importing and interacting with any verified IDApp contract.

As the concept of Web 3.0 interoperability gains momentum, we eagerly anticipate a future where blockchain networks seamlessly communicate and collaborate, opening up boundless opportunities for decentralised applications. Router Protocol, with its pioneering advancements in this domain, is poised to drive this transformative shift.

With Router Sandbox as a testament to Router Protocol’s potential, we can envision a landscape where developers and end-users alike can harness the power of cross-chain functionality with ease. By abstracting the complexities associated with cross-chain dApps and providing a user-friendly environment, Router Sandbox serves as a gateway for individuals with varying levels of technical expertise to dive deeper into the Router ecosystem.

Keep us close at hand by following us on your preferred social media platform!

Website | Twitter | Telegram | Telegram announcements | Discord

--

--

Router Protocol

Router Protocol is a secure, composable, and modular framework for building interoperable applications. More at https://routerprotocol.com