All Products
Search
Document Center

Blockchain as a Service:Blockchain as a Service:How to Use Cloud IDE

Last Updated:Mar 31, 2026

Cloud IDE is a browser-based contract development environment in the BaaS platform. Use it to write, compile, deploy, call, and debug Solidity smart contracts directly in your browser—no local toolchain required.

Prerequisites

Before you begin, make sure you have:

  • Access to the BaaS platform

  • A consortium contract project, or an applied test chain on the Overview page

  • (Optional) A private key (hexadecimal string) if using an SDK-created account instead of the default test account

Open Cloud IDE

Two entry points are available:

  • From Consortium Contract Projects: On the Consortium Contract Projects page of the BaaS platform, create a new contract or open an existing one.

  • From the Overview page: Go to the Overview page, then click Deploy Contract on Contract Test Chain.

Manage contract files

Create, delete, or rename folders and files in a contract project using the icons in Cloud IDE.

image.png
No.IconAction
image.pngAdd file or folder
image.pngDelete file or folder
image.pngRename file or folder
Contract files are saved in real time. Name new contract files with the .sol extension to ensure successful compilation.

Develop a contract

Follow these five steps to develop a contract in Cloud IDE:

  1. Select a target contract blockchain

  2. Compile the contract

  3. Deploy the contract

  4. Call the contract

  5. Debug the contract

Select a target contract blockchain

Click Environment Configuration to set the target blockchain environment.

envir

In Environment Configuration, select an existing contract blockchain. If you applied for a test blockchain, select it here—it includes a default test account for deploying and calling contracts.

If the default test account does not meet your requirements, use an account created with the SDK. In that case, enter the account's private key (a hexadecimal string) to sign transactions when deploying or calling contracts in Cloud IDE.

For instructions on getting the private key, see the sample code in Prepare a contract blockchain account.

Compile the contract

Click Compile to compile your contract code.

compile

Compilation produces two outputs:

  • Bytecode: The compiled contract code. This is the key artifact used to deploy the contract. Use the SDK to deploy bytecode to a target production chain.

  • Contract ABI: The Application Binary Interface (ABI) generated alongside the contract. ABI describes the contract's functions and state variables—field names, field types, method names, parameter names, parameter types, and return value types. It works like interface documentation for the contract.

ABI parameters

ParameterDescription
nameThe function name
typeThe method type: function, constructor, or fallback (the unnamed default function)
constantBoolean. If true, the method does not modify any state variable
payableBoolean. Indicates whether the method can receive transfers
stateMutabilityOne of: pure (does not read blockchain state), view (does not modify blockchain state), nonpayable, or payable
inputsArray of objects, each with name (parameter name) and type (parameter type)
outputsSimilar to inputs; omitted if the function returns nothing

For the full ABI specification, see Official Description of Solidity ABI (English).

Deploy the contract

After compilation, click Deploy to deploy the contract to the target test blockchain.

deploy

If your contract defines a constructor, specify the constructor parameters before deploying. Cloud IDE shows parameter type hints and default initial values for basic data types to help you initialize the contract correctly.

After deployment, Cloud IDE displays all contract methods.

list

Call the contract

After deployment, all public methods and public state variables are listed. Click Call Contract next to a method to invoke it.

call

Each call returns the following fields:

FieldDescription
inputThe input data passed to the method (typically the method parameters)
outputThe return values, encoded based on the data type
logEvent logs, if an event was triggered during execution

Debug the contract

Debug contract logic by adding Event statements to trigger log output and trace the execution path.

The following example calls the validCandidate method:

debug
// Checks whether the target candidate is in candidateList.
function validCandidate(bytes32 candidate) view public returns (bool) {
    for (uint i = 0; i < candidateList.length; i++) {
        if (candidateList[i] == candidate) {
            emit VALID(true);
            return true;
        }
    }
    emit VALID(false);
    return false;
}

Each branch emits a different event. Check the call result log to trace which execution path was taken. For complex contract logic, add Event statements at key branches to track the execution path and isolate bugs.

Analyze error codes

When a contract call fails, Cloud IDE returns an error code. These error codes match the codes used by the SDK. For the full list, see Contract blockchain error codes.

Example: diagnosing a contract error

The following call to voteForCandidate fails with error code 10201:

error
Error codeValueDescription
VM_REVERT10201Triggered by the revert command

Error code 10201 means the revert statement executed, which means require() returned false. Checking the contract code reveals this condition in voteForCandidate:

require(validCandidate(candidate));

The candidate Demi is not in candidateList, so validCandidate returns false and the transaction reverts. The contract was deployed with only two candidates (Nick and Rose) in the constructor.

What's next