Workspaces
RPC method for attaching a Workspace (per-address dashboard) to a wallet, a mainnet contract, or any address you have an ABI for.
These back the SDK’s addWorkspace and the CLI’s workspace add.
dev_addWorkspace
Create a Workspace. The server auto-dispatches based on the input fields — you never declare a Workspace “type” yourself.
| Parameter | Type | Description |
|---|---|---|
input | object | See fields below |
Input fields:
| Field | Type | Description |
|---|---|---|
name | string | Display name shown in the dashboard. Required. |
address | string? | The address to attach the Workspace to. Omit only for ABI-only manual Workspaces. |
abi | string? | JSON-encoded ABI string. When provided, creates a manual Workspace. |
type | 'ERC20' | 'ERC721'? | UI hint for mainnet-contract Workspaces; ignored otherwise. |
Dispatch rules:
| You provide | What gets created |
|---|---|
address only, no on-chain code at the address | wallet Workspace |
address only, code matches mainnet | mainnet-contract Workspace (ABI fetched from Etherscan on demand) |
address + abi | manual Workspace, deployment linked to the address |
abi only, no address | manual Workspace, ABI-only (scaffold before deploy) |
If you pass address for a contract that lives only on your Stagenet (not mainnet) and don’t include abi, the call returns an actionable error telling you to pass abi or run dev_importContracts.
Result
The result is a discriminated union keyed by kind:
{
"kind": "wallet",
"wallet": {
"id": "wlt_...",
"name": "Binance Hot Wallet",
"address": "0x28c6c06298d514db089934071355e5743bf21d60",
"createdAt": "2025-04-12T14:32:01.000Z"
}
}{
"kind": "mainnet-contract",
"mainnetProjectContract": {
"id": "mpc_...",
"name": "USDC",
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"type": "ERC20",
"createdAt": "2025-04-12T14:32:01.000Z"
}
}{
"kind": "manual",
"projectContract": { "id": "pc_...", "name": "MyVault" },
"projectContractVersion": { "id": "pcv_..." },
"projectContractDeployment": { "id": "pcd_...", "address": "0x..." }
}For the ABI-only manual case, projectContractDeployment is null.
Example — wallet Workspace
curl -X POST <YOUR_STAGENET_RPC_URL> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "dev_addWorkspace",
"params": [{
"address": "0x28C6c06298d514Db089934071355E5743bf21d60",
"name": "Binance Hot Wallet"
}]
}'Example — mainnet contract Workspace
curl -X POST <YOUR_STAGENET_RPC_URL> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "dev_addWorkspace",
"params": [{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"name": "USDC",
"type": "ERC20"
}]
}'Example — manual Workspace from an ABI
curl -X POST <YOUR_STAGENET_RPC_URL> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "dev_addWorkspace",
"params": [{
"address": "0xYourVault...",
"name": "MyVault",
"abi": "[{\"type\":\"function\",\"name\":\"deposit\",\"inputs\":[],\"outputs\":[]}]"
}]
}'Last updated on