This page provides a step-by-step tutorial to deploy a sample app with Xooa’s blockchain platform-as-a-service (PaaS/BaaS). Xooa provides a permanent cloud end-point for the smart contract, enabling cloud-to-cloud integration, while retaining blockchain’s peer-to-peer capabilities.
If you are using Xooa for the first time and just want to go through the process of creating a blockchain app, then you need only log in to Xooa. That’s it. Nothing more to do. Read no further.
To deploy your smart contract, you can proceed with either of the below options:
The easiest way to do that is to fork Xooa’s repository, which contains the necessary files:
If you already have an existing blockchain smart contract, you can use that too.
Click Deploy Your First App.
Locate your smart contract:
From Smart Contract, select the smart contract you want to deploy, the network you want to deploy on, the language of your smart contract and then click Deploy. This deploys the contract to Xooa and creates an identity that can access the ledger.
Yeah, you are almost done. Xooa is doing the blockchain heavy lifting. You will be redirected to the app’s dashboard when the process completes. Be sure to copy that API token.
Go to the Identities tab, and then click Add New
Enter an identity name and under API Access Permission, select Read+Write.
Click Create. You’ll get a message that the identity has been enrolled and the API token generated.
Before you dismiss the message, click Copy, The token is now in the clipboard.
Store the token somewhere safe. You will need it to authorize every API request.
Xooa does not store the API token. If you lose the token, you will have to generate a new one, invalidating any existing API clients.
You have created your smart contract app and now you want to invoke a smart contract function. Here, we’ll demonstrate the
set function on the Get-Set smart contract. This function allows us to write data to the ledger. We can invoke functions directly from the API documentation, but you will need API token you copied earlier.
In your Get-Set app, go to the API tab, and then click Explore API’s. The API Explorer, including the API documentation, opens.
In the top left there is an input field for the API token, paste the token you copied earlier here.
From the navigation, go to Smart Contract > Invoke Smart Contract Function.
In the fcn field, enter
set. The function set on the Get-Set smart contract will write to the ledger.
In the body field, enter the data you want to store in the ledger in the format:
[ "<key>", "<value>" ]
If your HTTP response code was 200, you have saved data in a blockchain ledger by using Xooa. Check instructions in the message or the API documentation for other return codes.
Click the Tx id to get additional details about the transaction
Deploy Hypeledger Fabric Smart Contract
Deploy Ethereum Smart Contract