KWALA Documentation

Complete guide to KWALA's YAML-based scripting language for Web3 automation

KWALA Scripting Language Overview

KWALA Scripts are YAML-based declarative workflows used to define off-chain logic that reacts to on-chain events, time-based triggers, or Web2 inputs. These scripts are executed by the KWALA network to automate backend logic — without requiring traditional servers, polling mechanisms, or custom infrastructure.

Each script is composed of four main sections:

Name

Identifier for the workflow

Execution

Execution mode (parallel or sequential)

Action

The steps to be executed

Trigger

The steps to be executed

Getting Started with KWALA

Before you can create and run KWALA workflows, you need to set up your wallet and obtain KWALA credits. Here's a step-by-step guide to get you started:

01

Step1: Connect Your KALP Wallet

KWALA integrates seamlessly with KALP Wallet to manage your workflow executions and payments.

  • 1 Create a KALP Wallet account if you don't have one.
  • 2 Once your KALP Wallet is set up, a unique KWALA address is automatically generated.
  • 3 Your KWALA address follows the format: KWL-YourKalpAddress-CC
02

Step 2: Purchase KWALA Credits

KWALA uses a credit-based system to execute your workflows. Here's how to add credits to your account:

Payment Method

Pay with USDT to purchase KWALA credits

Instant Recharge

Credits are added to your KWALA address immediately

Web3 automation platform

Pro Tip

Keep your KWALA address topped up to ensure uninterrupted workflow execution. You can recharge at any time through your KALP Wallet.

03

Step 3: Workflow Execution & Credit Deduction

Every time you run a KWALA workflow, credits are automatically deducted from your KWALA address:

  • Web3 automation Credits are deducted based on the complexity and resources used by your workflow
  • Web3 automation Failed workflows may still consume minimal credits for processing
  • Web3 automation You can monitor your credit balance and usage through your KALP Wallet
  • Web3 automation Low balance notifications help you stay ahead of your credit needs
decentralized Web3 ecosystem

KWALA Address Example

Your KALP Wallet Address:

0x742d35Cc6e9A5f1e7A0e6FD4C8b2Bc3F5d9E1234

Generated KWALA Address:

KWL-0x742d35Cc6e9A5f1e7A0e6FD4C8b2Bc3F5d9E1234-CC

This KWALA address is where you'll send USDT to purchase credits and where credits will be deducted for workflow execution.

Name

  • Web3 automation platform A descriptive name for the workflow
  • Web3 automation platform Should be unique within your project or environment

Execution

Mode

Defines whether actions are executed in parallel or sequential order.

  • 1 parallel
    All actions run concurrently
  • 2 sequential
    Actions run one after another

Actions

This is where you define what the workflow actually does — deploying contracts, calling functions, sending tokens, or invoking APIs.

Action Fields Explained:
Field Required Description
Name Web3 automation The unique identifier for the API resource
Type Web3 automation Type of action: deploy, call, api
APIEndpoint Web3 automation URL if making an API call (used when Type is api)
APIPayload Web3 automation Request body for the API call
Bytecode Web3 automation For Deploy Contract bytecode (hex string) when deploying
EncodedABI Web3 automation ABI-encoded constructor or function call
InitializationArgs Web3 automation For Deploy Arguments to pass into the constructor
TargetContract Web3 automation For Call Address of the smart contract to interact with
TargetFunction Web3 automation For Call Function name (e.g., transfer, mint)
TargetParams Web3 automation For Call Parameters for the function call
ChainID Web3 automation EVM Chain ID where the action will be executed
Metadata Web3 automation Optional metadata or tags
RetriesUntilSuccess Web3 automation Number of retries until success (default is 0)

Trigger

This section defines when and how the workflow is initiated.

Trigger Fields Explained:
Field Required Description
Name decentralized Web3 ecosystem The unique identifier for the API resource
Type decentralized Web3 ecosystem Type of action: deploy, call, api
APIEndpoint decentralized Web3 ecosystem URL if making an API call (used when Type is api)
APIPayload decentralized Web3 ecosystem Request body for the API call
Bytecode decentralized Web3 ecosystem For Deploy Contract bytecode (hex string) when deploying
EncodedABI decentralized Web3 ecosystem ABI-encoded constructor or function call
InitializationArgs decentralized Web3 ecosystem For Deploy Arguments to pass into the constructor
TargetContract decentralized Web3 ecosystem For Call Address of the smart contract to interact with
TargetFunction decentralized Web3 ecosystem For Call Function name (e.g., transfer, mint)
TargetParams decentralized Web3 ecosystem For Call Parameters for the function call
ChainID decentralized Web3 ecosystem EVM Chain ID where the action will be executed
Metadata decentralized Web3 ecosystem Optional metadata or tags
RetriesUntilSuccess decentralized Web3 ecosystem Number of retries until success (default is 0)

Complete Example: NFT Deployment Workflow

Best Practices

Decentralization and permissioning in Kwala

Pro Tip

  • Web3 automation platform Always validate YAML for indentation and formatting
  • Web3 automation platform Test scripts using the KWALA Playground before deployment
  • Web3 automation platform Use parallel for independent tasks and sequential for dependent ones
  • Web3 automation platform You can combine Web2 and Web3 actions in one script
  • Web3 automation platform Keep API secrets and keys secure — never hardcode sensitive data in public workflows

Coming Soon (Planned Extensions)

  • Web3 automation Environment variables for secrets and keys
  • Web3 automation Conditionals (if/else logic)
  • Web3 automation Input forms for user-triggered workflows
  • Web3 automation Reusable components and template libraries