# Commands

A command is the core building block of The Simulacra. A command is similar to a traditional blockchain transaction. A command is structured with some consistent fields.

A command is structured:

```
struct Command {
    bytes32 id; // Identifier from the source
    uint256 chainId; // chainId, if blank can be executed on any chain
    uint256 nonce; // nonce to enable cancellation of commands
    uint256 value; // amount of NATIVE

    // wallet info
    bytes32 ownerId; // command owner's identifier
    bytes32 namespace; // namespace of the wallet (used for source)
    uint16 walletIndex; // defaults to 0
    
    // command definition
    bytes32 metaprotocol;
    bytes32[] modifiers; // additional command indicators
    Reference[] references; // additional information about a referenced entity
    string[] args;
    Field[] kwargs;
    
    // additional data
    uint64 timestamp; // timestamp with ms
    uint256 gas;
    uint256 bribe; // bribe for priority in mempool
    bytes32 hash; // maybe we don't need this
    
    // validate the execution
    CommandStatus status;
    uint256 gasUsed;
}

enum CommandStatus {
    PENDING,
    SUCCESS,
    FAILURE,
    CANCELLED
}

struct Field {
    bytes32 key;
    string value;
}

struct Reference {
    bytes32 source; // This simplifies handling of the reference
    bytes32 identifier; // globally unique identifier
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.simulacrum.network/synthetic-blockchain/organization/commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
