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.

| No. | Icon | Action |
|---|---|---|
| ① | ![]() | Add file or folder |
| ② | ![]() | Delete file or folder |
| ③ | ![]() | Rename 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:
Select a target contract blockchain
Click Environment Configuration to set the target blockchain environment.

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.

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
| Parameter | Description |
|---|---|
name | The function name |
type | The method type: function, constructor, or fallback (the unnamed default function) |
constant | Boolean. If true, the method does not modify any state variable |
payable | Boolean. Indicates whether the method can receive transfers |
stateMutability | One of: pure (does not read blockchain state), view (does not modify blockchain state), nonpayable, or payable |
inputs | Array of objects, each with name (parameter name) and type (parameter type) |
outputs | Similar 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.

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.

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

Each call returns the following fields:
| Field | Description |
|---|---|
input | The input data passed to the method (typically the method parameters) |
output | The return values, encoded based on the data type |
log | Event 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:

// 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 code | Value | Description |
|---|---|---|
VM_REVERT | 10201 | Triggered 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.


