BlockApps STRATO is the fastest way to build, launch, and deploy decentralized apps.
The STRATO dApp portal is a browser-based web application interacting with the STRATO blockchain via REST API calls. The dApp portal is a browser web application, which interacts with smart contract on the deployed on BlockApps STRATO using various APIs that handle method invocations, contract calls and transaction signing.
- STRATO dApp portal is currently a client-side only app, fully-running in the user's browser;
- STRATO dApp portal should not have any pre-deployed contracts on the blockchain before initiating transactions to blockchain from the dApp;
index.html
should be the only entry point to the dApp and may include external Javascript and static files;- UI files should not contain the absolute paths to local files (links starting with
/
). All links and paths should be relative to the index.html location;
- The applications are packaged as a collection of smart contracts and front end code.
- The front end interacts directly with the smart contracts using the REST APIs provided by BlockApps STRATO
- The app should use
index.html
as an entry point to the application, which in turn loads all other static resources (js and css). You can look at charity-raffle or this example. - Since the UI maybe shipped to different nodes,
index.html
should use only relative paths instead of absolute paths for local static resources.
Your application should have a text file called metadata.json
in the root folder. metadata.json
defines the application (1) name, (2) version, (3) description and (4) maintainer of the dApp.
STRATO dApps need a metadata.json
file in the root folder, defining the name of the application, it's version, description and maintainer information.
Example:
{
"name": "my dApp",
"version": "0.0.1",
"description": "Most useful and helpful decentralized application ever.",
"maintainer": "Alice, [email protected]"
}
Your dApp should be packaged as a Zip file.
File structure of the Zip archive is strictly defined:
STRATO dApp should be packaged as a zip archive which contains the smart contracts and the UI, with the following format.
.zip
├─ contracts/
│ └─ ...all solidity contract files (*.sol)
│
├─ metadata.json
│
├─ index.html
│
└─ ...other ui application files/directories used by index.html
You may name the Zip file whatever you would like.
Coming soon (next release): a CLI tool to test whether your dApp is packaged properly.
- Open the STRATO Management Dashboard in your browser by entering the STRATO node URL (enter the login credentials if prompted:
admin/admin
by default) - Create a user account if you don't have one on this node, and click "faucet" to add ether to the account:
- Go to "Accounts" tab
- Click "Create User" button
- Submit the form
- Click "Faucet" button when the user appears in the list
- Copy user's account address (account column)
- Go to "Apps" tab
- Click "Deploy" button
- Submit the form using the user credentials, the account address from buffer and your Zip package.
- In a few seconds, you should be able to see your new app in the list. This may take up to a minute.
To run the decentralized application in SMD:
- Go to "Apps" tab
- Navigate to the dApp you wish to deploy and click "launch"
- Congratulations! Your dApp is now available on the STRATO dApp portal.