Simulacrum
  • Overview
  • Existential Attestation
    • Validators
  • Synthetic Blockchain
    • Organization
      • Indexer
        • Sources
          • X
          • Telegram
          • TBD
      • Blocks
      • Mempool
      • Commands
        • Wallet
        • Metaprotocols
        • Modifiers
        • Arguments
        • Keyword Arguments
      • Effects
    • Roadmap
  • Metaprotocols
    • The Drops
      • Modules
        • Tokens
          • Token Deployment
          • Airdrops
          • Trading
          • Liquidity
        • Trading
        • Vaults
      • Points
    • MiniGame (TBD)
    • Sportsbook (TBD)
    • Lottery (TBD)
  • Revenue
    • $EMP Staking
  • Fair Witness API
    • Integration
  • FAQ
  • Guides
  • Website
  • X
  • Empyreal
  • Empyreal Docs
Powered by GitBook
On this page
  1. Synthetic Blockchain
  2. Organization

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
}
PreviousMempoolNextWallet

Last updated 7 months ago