Create Context
Create a context using the Admin Dashboard​
- Navigate to the "Contexts" tab and click the "Start New Context" button.
- Use the "Browse" button to select an application from the list.
- Choose the "Template Application" option.
- Press "Start" to initiate the context creation process with the selected application.
After the context is created, you will be redirected to the context dashboard. Keep this page open as you will need the Context ID later.
Since a coordinator node is required for each context, you’ll need to invite the coordinator to join. Follow the steps in the Invite To Context guide. guide to complete this process.
Create context with the CLI using meroctl​
Step 1: Install the Application​
Run the following command to install the application:
cargo run -p meroctl -- --node-name node1 --home data \
app install --url {url} \
--metadata '{"contractAppId": "{contractApplicationId}" }'
You can find the application URL and contractApplicationId
by opening
Application Details from Applications section of the Admin Dashboard.
contractApplicationId
is the id of application stored in the contract. Value
is optional but if provided, it enables Admin Dashboard to extract and display
the application metadata.
cargo run -p meroctl -- --node-name node1 --home data \
app install --url https://blobby-public.euw3.prod.gcp.calimero.network/bafkreihl5o6etrnpy7dlgixz3onbfb3og4dll2yqsqaebqakuldk6e2qya \
--metadata '{"contractAppId": "980265ba072119a9074e429dea477e1c084a94e8d9f645c0158680e6942fb99e"}'
2024-09-18T17:31:05.718772Z INFO meroctl::cli::app::install: Application installed successfully. Application ID: F1Y3NhtUQe8Mj8TDddvkvtKf5V2f1bcs5tf2fvSyfaE7
Step 2: Create a New Context​
After the application is successfully installed, you can create a new context with the installed application using this command:
cargo run -p meroctl -- --node-name node1 --home data \
context create --application-id {applicationId}
cargo run -p meroctl -- --node-name node1 --home data \
context create --application-id F1Y3NhtUQe8Mj8TDddvkvtKf5V2f1bcs5tf2fvSyfaE7
Since each context requires a coordinator node, you’ll need to invite the coordinator to join the context. Follow the steps in the Invite To Context guide to complete the setup.