sozo component

component用于与世界的组件进行交互。它可用于查询组件信息或实体的组件值。

用例

sozo component <COMMAND>

Commands:
  get     Get the class hash of a component
  schema  Retrieve the schema for a component
  entity  Get the component value for an entity

子命令

get

获取组件的Class Hash

sozo component get <NAME>
参数

NAME
    组件名称

schema

获取组件的scbema

sozo component schema <NAME>
参数

NAME
    组件名称

entity

获取实体的组件值

sozo component entity <NAME> [KEYS]...
参数

NAME
    组件名称

KEYS
    要查询的实体的键值。
    以逗号分隔的值,例如:0x12345,0x69420,...

选项

世界选项

--world WORLD_ADDRESS
    世界合约的地址。
    ENV: DOJO_WORLD_ADDRESS

Starknet选项

--rpc-url URL
    Starknet RPC 端点。[默认: http://localhost:5050]
    ENV: STARKNET_RPC_URL