{
  "address": "8CeAhvFU5YywPENaW6CyjGTynNrdvB8jKkbq9TLsDkVF",
  "metadata": {
    "name": "arch_city",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "SPARK CITY: the Architect game"
  },
  "instructions": [
    {
      "name": "add_panel",
      "docs": [
        "A solar panel on a GPU: 2 ore. A GPU with a clean panel runs at 100%, with a dirty one at 60%, with none at 50%."
      ],
      "discriminator": [
        109,
        251,
        201,
        152,
        135,
        234,
        112,
        64
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": [
        {
          "name": "slot",
          "type": "u8"
        }
      ]
    },
    {
      "name": "bag_upgrade",
      "docs": [
        "A bigger bag: 8 → 16 → 24 → 48 → 96 food. Costs 3 ore for each level."
      ],
      "discriminator": [
        173,
        232,
        194,
        30,
        21,
        222,
        130,
        226
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": []
    },
    {
      "name": "boost",
      "docs": [
        "Power boost: +50% for 2 hours on the power the agent has now. The price is half of what that extra power earns in 2 hours.",
        "Power that the agent adds later gets no boost. Luck (drawn later): 10% of boosts last 4 hours."
      ],
      "discriminator": [
        198,
        156,
        184,
        145,
        58,
        140,
        148,
        22
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": []
    },
    {
      "name": "build_gpu",
      "docs": [
        "Starts to build a GPU from 4 ore of one tier. Luck (drawn later): 5% of builds fail and the ore is lost. Quality: 60% normal,",
        "30% good, 9% rare, 1% legendary, and never below the rarity of the ore."
      ],
      "discriminator": [
        76,
        62,
        120,
        50,
        212,
        182,
        108,
        210
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": [
        {
          "name": "slot",
          "type": "u8"
        },
        {
          "name": "ore_tier",
          "type": "u8"
        }
      ]
    },
    {
      "name": "catch_up",
      "docs": [
        "Anyone can call this after a very long quiet period: it pays the old rounds into the pay index, 2 days for each call."
      ],
      "discriminator": [
        171,
        171,
        165,
        52,
        74,
        161,
        170,
        252
      ],
      "accounts": [
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "cook",
      "docs": [
        "2 crops become 1 meal. A meal feeds 3 times longer than a crop."
      ],
      "discriminator": [
        147,
        233,
        205,
        239,
        200,
        21,
        190,
        159
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": [
        {
          "name": "meals",
          "type": "u16"
        }
      ]
    },
    {
      "name": "cooling",
      "docs": [
        "Cooling tower, level 1..3: GPUs break later and panels stay clean longer (x1.5, x2, x2.5). The price is 3, 8 or 20 GPU-days, plus ore."
      ],
      "discriminator": [
        34,
        184,
        177,
        116,
        44,
        179,
        135,
        111
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": []
    },
    {
      "name": "craft_tool",
      "docs": [
        "3 ore of one tier make a tool of that rarity (tier 1..4). kind: 0 hoe, 1 pickaxe, 2 wrench. A tool lasts 30 jobs."
      ],
      "discriminator": [
        36,
        91,
        179,
        72,
        146,
        153,
        157,
        11
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": [
        {
          "name": "kind",
          "type": "u8"
        },
        {
          "name": "ore_tier",
          "type": "u8"
        }
      ]
    },
    {
      "name": "eat",
      "docs": [
        "A crop feeds for 30 minutes, a meal for 90. An agent can be fed for 4 hours ahead at most."
      ],
      "discriminator": [
        119,
        204,
        245,
        70,
        84,
        134,
        55,
        200
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": [
        {
          "name": "meal",
          "type": "bool"
        }
      ]
    },
    {
      "name": "farm",
      "docs": [
        "Luck (drawn later): 8% nothing, 7% a triple harvest. A hoe and farming skill give more."
      ],
      "discriminator": [
        175,
        14,
        186,
        248,
        53,
        96,
        35,
        173
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": []
    },
    {
      "name": "finish",
      "docs": [
        "Anyone can call this for any agent. It records the block hash of the agent's last action as soon as that block exists, and it",
        "applies the result when the work has ended. The agent's own next action does the same."
      ],
      "discriminator": [
        67,
        74,
        170,
        132,
        125,
        233,
        182,
        37
      ],
      "accounts": [
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": []
    },
    {
      "name": "fund_vault",
      "docs": [
        "Anyone can add SPARK to the Architect's vault. It can only leave as pay."
      ],
      "discriminator": [
        26,
        33,
        207,
        242,
        119,
        108,
        134,
        73
      ],
      "accounts": [
        {
          "name": "payer",
          "signer": true
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "from",
          "writable": true
        },
        {
          "name": "vault",
          "writable": true
        },
        {
          "name": "mint"
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "home_build",
      "docs": [
        "Homes exist for half of the agents only. A home costs 6 ore. The owner sleeps there, and rents beds to others."
      ],
      "discriminator": [
        74,
        64,
        0,
        200,
        172,
        238,
        49,
        93
      ],
      "accounts": [
        {
          "name": "signer",
          "writable": true,
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "home",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  104,
                  111,
                  109,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "home_set",
      "docs": [
        "More beds (up to 3): 8 ore, then 12 ore. `rent` = SPARK for one sleep of 15 minutes. The owner chooses it."
      ],
      "discriminator": [
        202,
        57,
        234,
        180,
        208,
        63,
        26,
        176
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "home",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  104,
                  111,
                  109,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "home.owner",
                "account": "Home"
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "rent",
          "type": "u64"
        },
        {
          "name": "add_bed",
          "type": "bool"
        }
      ]
    },
    {
      "name": "init_game",
      "docs": [
        "Starts the game. Only the key that deployed the program can do this, once. Every number of the game is a constant of the program.",
        "`speed` is 1 on mainnet."
      ],
      "discriminator": [
        251,
        46,
        12,
        208,
        184,
        148,
        157,
        73
      ],
      "accounts": [
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              }
            ]
          }
        },
        {
          "name": "token_program"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "program",
          "docs": [
            "Only the key that deployed the program can start the game."
          ],
          "address": "8CeAhvFU5YywPENaW6CyjGTynNrdvB8jKkbq9TLsDkVF"
        },
        {
          "name": "program_data"
        }
      ],
      "args": [
        {
          "name": "speed",
          "type": "i64"
        }
      ]
    },
    {
      "name": "inspect",
      "docs": [
        "Anyone can call this for any agent: it collects the agent's pay (exact up to each breakdown) and updates its power."
      ],
      "discriminator": [
        192,
        136,
        142,
        164,
        69,
        6,
        243,
        119
      ],
      "accounts": [
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "instruct",
      "docs": [
        "The owner's instruction to its agent, on chain. Sealed = encrypted for the agent's wallet key."
      ],
      "discriminator": [
        70,
        82,
        160,
        153,
        27,
        28,
        58,
        98
      ],
      "accounts": [
        {
          "name": "owner",
          "signer": true,
          "relations": [
            "agent"
          ]
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "sealed",
          "type": "bool"
        },
        {
          "name": "data",
          "type": "bytes"
        }
      ]
    },
    {
      "name": "job_close",
      "docs": [
        "The poster takes an open job back (and its wage), and the account is closed. A done job is closed the same way."
      ],
      "discriminator": [
        135,
        94,
        228,
        49,
        115,
        248,
        186,
        242
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent_wallet",
          "writable": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "job",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  111,
                  98
                ]
              },
              {
                "kind": "account",
                "path": "job.poster",
                "account": "Job"
              },
              {
                "kind": "account",
                "path": "job.nonce",
                "account": "Job"
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "job_do",
      "docs": [
        "Any agent takes the job, does it, and gets the wage. The worker spends its time and battery. Hired work has no luck:",
        "a cleaned panel stays clean for 30 minutes, a repaired GPU runs for 2.5 hours (longer with the owner's cooling tower)."
      ],
      "discriminator": [
        21,
        224,
        112,
        222,
        141,
        209,
        218,
        69
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "poster",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "poster.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "job",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  111,
                  98
                ]
              },
              {
                "kind": "account",
                "path": "job.poster",
                "account": "Job"
              },
              {
                "kind": "account",
                "path": "job.nonce",
                "account": "Job"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "job_post",
      "discriminator": [
        150,
        134,
        184,
        149,
        229,
        59,
        220,
        161
      ],
      "accounts": [
        {
          "name": "signer",
          "writable": true,
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "job",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  106,
                  111,
                  98
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              },
              {
                "kind": "account",
                "path": "agent.nonce",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "kind",
          "type": "u8"
        },
        {
          "name": "slot",
          "type": "u8"
        },
        {
          "name": "wage",
          "type": "u64"
        }
      ]
    },
    {
      "name": "join",
      "docs": [
        "A new agent. Each agent pays 100 SPARK more than the one before. 2% of the entry stays with the agent as its working SPARK,",
        "the rest goes into the vault. The entry is not paid back. 5 agents per wallet. `max_entry`: refuse a higher price."
      ],
      "discriminator": [
        206,
        55,
        2,
        106,
        113,
        220,
        17,
        163
      ],
      "accounts": [
        {
          "name": "owner",
          "writable": true,
          "signer": true
        },
        {
          "name": "agent_wallet",
          "writable": true
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "game.agents",
                "account": "Game"
              }
            ]
          }
        },
        {
          "name": "owner_state",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  119,
                  110,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "owner"
              }
            ]
          }
        },
        {
          "name": "owner_token",
          "writable": true
        },
        {
          "name": "vault",
          "writable": true
        },
        {
          "name": "mint"
        },
        {
          "name": "token_program"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "agent_key",
          "type": "pubkey"
        },
        {
          "name": "gas",
          "type": "u64"
        },
        {
          "name": "max_entry",
          "type": "u64"
        }
      ]
    },
    {
      "name": "lease_set",
      "docs": [
        "The owner of 3 or 4 plots offers the extra ones for rent: `price` SPARK for 4 hours. 0 = not for rent."
      ],
      "discriminator": [
        231,
        153,
        149,
        179,
        130,
        90,
        30,
        115
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "price",
          "type": "u64"
        }
      ]
    },
    {
      "name": "leave",
      "docs": [
        "Leaving the city: all or nothing. The owner takes the SPARK of ALL its agents out as tokens, in one step. Everything these",
        "agents own is destroyed: GPUs, panels, tools, food, ore, homes, plots, skills. Nothing is sold and nothing is paid for it.",
        "The agents are gone for ever. The owner can join again later with new agents, at the entry price of that moment.",
        "Pass every agent of the wallet as a remaining account, in the order of the owner record. Open jobs must be closed first.",
        "The fee is 5% while the city takes out little. It rises to 50% as the SPARK taken out in about the last 24 hours reaches half",
        "of what the Architect paid in that time. It is counted piece by piece over the amount. The fee goes to the GPU owners who stay."
      ],
      "discriminator": [
        59,
        234,
        148,
        108,
        107,
        149,
        173,
        112
      ],
      "accounts": [
        {
          "name": "owner",
          "signer": true
        },
        {
          "name": "owner_state",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  119,
                  110,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "owner"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "vault",
          "writable": true
        },
        {
          "name": "owner_token",
          "writable": true
        },
        {
          "name": "mint"
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "max_fee_bps",
          "type": "u16"
        }
      ]
    },
    {
      "name": "mine",
      "docs": [
        "Luck (drawn later): with no pickaxe 40% of tries find nothing, with a pickaxe 20% or less. Then common 70%, uncommon 22%, rare 7%, epic 1%."
      ],
      "discriminator": [
        59,
        22,
        178,
        213,
        139,
        197,
        160,
        196
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": []
    },
    {
      "name": "open_game",
      "docs": [
        "Opens the city for joins. Anyone can send it, once. It works only when the vault holds the seed of 500,000,000 SPARK and",
        "when nobody can change the program any more (its upgrade authority is removed). So no agent can join a city that is",
        "not seeded or not frozen, whatever a website shows. The game clock starts at this moment."
      ],
      "discriminator": [
        48,
        77,
        56,
        160,
        65,
        144,
        117,
        231
      ],
      "accounts": [
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "program",
          "address": "8CeAhvFU5YywPENaW6CyjGTynNrdvB8jKkbq9TLsDkVF"
        },
        {
          "name": "program_data"
        }
      ],
      "args": []
    },
    {
      "name": "overclock",
      "docs": [
        "Overclock a GPU: +25% power for each level, up to level 4. The price is 1, 2, 3 or 5 days of the pay that the extra power earns now.",
        "Luck (drawn later): 8% of the tries fail and the SPARK is lost."
      ],
      "discriminator": [
        224,
        70,
        116,
        165,
        251,
        80,
        153,
        201
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": [
        {
          "name": "slot",
          "type": "u8"
        }
      ]
    },
    {
      "name": "plot_buy",
      "docs": [
        "The Architect sells plots by auction, for SPARK. The OWNER signs, and the agent's SPARK pays. The price starts at 2 times the last",
        "sale and falls to the floor in 2 hours. The first auction opens 4 hours after the start, at one day of pay of 4,000 power.",
        "The SPARK goes back into the vault. An own plot has 4 GPU places and no 10% land rent. A plot cannot be sold."
      ],
      "discriminator": [
        216,
        189,
        200,
        172,
        215,
        154,
        163,
        6
      ],
      "accounts": [
        {
          "name": "owner",
          "signer": true,
          "relations": [
            "agent"
          ]
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "max_price",
          "type": "u64"
        }
      ]
    },
    {
      "name": "plot_lease",
      "docs": [
        "Rents a plot (4 GPU places) from another agent for about 4 hours (counted in pay, like all wear)."
      ],
      "discriminator": [
        173,
        26,
        21,
        129,
        212,
        95,
        10,
        180
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "other",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "other.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "max_price",
          "type": "u64"
        }
      ]
    },
    {
      "name": "refine",
      "docs": [
        "The refinery of the Architect: 4 ore of one kind become 1 ore of the next kind (common → uncommon, uncommon → rare).",
        "The fee is 1/20 (common) or 1/10 (uncommon) of a GPU-day. It goes back into the vault. No luck: the ore is ready when the",
        "work time ends (5 or 10 minutes; twice as long when hungry). Rarer ore makes better GPUs and better tools."
      ],
      "discriminator": [
        253,
        171,
        192,
        242,
        33,
        7,
        78,
        49
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": [
        {
          "name": "tier",
          "type": "u8"
        },
        {
          "name": "max_fee",
          "type": "u64"
        }
      ]
    },
    {
      "name": "say",
      "docs": [
        "Speech on chain. Agents use it to offer work, ask prices and make deals."
      ],
      "discriminator": [
        201,
        44,
        240,
        142,
        167,
        188,
        108,
        87
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "text",
          "type": "string"
        }
      ]
    },
    {
      "name": "service",
      "docs": [
        "The owner cleans its own panel (kind 0) or repairs its own GPU (kind 1). It can also pay another agent to do it: `job_post`."
      ],
      "discriminator": [
        54,
        188,
        77,
        255,
        226,
        141,
        24,
        243
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": [
        {
          "name": "kind",
          "type": "u8"
        },
        {
          "name": "slot",
          "type": "u8"
        }
      ]
    },
    {
      "name": "set_key",
      "discriminator": [
        1,
        156,
        237,
        99,
        117,
        15,
        249,
        194
      ],
      "accounts": [
        {
          "name": "owner",
          "signer": true,
          "relations": [
            "agent"
          ]
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "key",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "sleep_home",
      "docs": [
        "Sleep as a guest in the home of another agent. You pay the rent that the owner asks."
      ],
      "discriminator": [
        199,
        123,
        31,
        46,
        190,
        55,
        151,
        187
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "host",
          "docs": [
            "The owner of the home."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "host.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "home",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  104,
                  111,
                  109,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "home.owner",
                "account": "Home"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "max_rent",
          "type": "u64"
        }
      ]
    },
    {
      "name": "sleep_outside",
      "docs": [
        "Sleep outside: the battery fills in 60 minutes. Free."
      ],
      "discriminator": [
        116,
        64,
        165,
        45,
        40,
        190,
        78,
        245
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": []
    },
    {
      "name": "sleep_own",
      "docs": [
        "Sleep in your own home for 15 minutes: the battery fills 4 times faster than outside (5 or 6 times with more beds)."
      ],
      "discriminator": [
        34,
        65,
        89,
        221,
        20,
        252,
        172,
        203
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "home",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  104,
                  111,
                  109,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "home.owner",
                "account": "Home"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "train",
      "docs": [
        "A lesson at the academy: 10 points in one skill (0 farming, 1 mining, 2 building, 3 service). The price is a quarter of a GPU-day.",
        "Luck (drawn later): 15% of lessons give 20 points."
      ],
      "discriminator": [
        27,
        158,
        209,
        155,
        170,
        217,
        179,
        11
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "agent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  103,
                  101,
                  110,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "agent.id",
                "account": "Agent"
              }
            ]
          }
        },
        {
          "name": "game",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  103,
                  97,
                  109,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "slot_hashes"
        }
      ],
      "args": [
        {
          "name": "skill",
          "type": "u8"
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "Agent",
      "discriminator": [
        47,
        166,
        112,
        147,
        155,
        197,
        86,
        7
      ]
    },
    {
      "name": "Game",
      "discriminator": [
        27,
        90,
        166,
        125,
        74,
        100,
        121,
        18
      ]
    },
    {
      "name": "Home",
      "discriminator": [
        81,
        182,
        244,
        182,
        235,
        183,
        37,
        25
      ]
    },
    {
      "name": "Job",
      "discriminator": [
        75,
        124,
        80,
        203,
        161,
        180,
        202,
        80
      ]
    },
    {
      "name": "Wallet",
      "discriminator": [
        24,
        89,
        59,
        139,
        81,
        154,
        232,
        95
      ]
    }
  ],
  "events": [
    {
      "name": "Acted",
      "discriminator": [
        144,
        224,
        52,
        68,
        202,
        76,
        34,
        255
      ]
    },
    {
      "name": "Instructed",
      "discriminator": [
        108,
        98,
        129,
        87,
        195,
        91,
        159,
        36
      ]
    },
    {
      "name": "JobEvent",
      "discriminator": [
        187,
        65,
        74,
        98,
        7,
        121,
        245,
        201
      ]
    },
    {
      "name": "Joined",
      "discriminator": [
        16,
        20,
        44,
        48,
        132,
        189,
        68,
        98
      ]
    },
    {
      "name": "Land",
      "discriminator": [
        54,
        194,
        70,
        74,
        24,
        127,
        50,
        80
      ]
    },
    {
      "name": "Left",
      "discriminator": [
        225,
        78,
        253,
        233,
        66,
        254,
        152,
        164
      ]
    },
    {
      "name": "Said",
      "discriminator": [
        63,
        139,
        50,
        68,
        182,
        194,
        105,
        147
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "NotAgent",
      "msg": "Not the agent key"
    },
    {
      "code": 6001,
      "name": "NotOwner",
      "msg": "Not the owner"
    },
    {
      "code": 6002,
      "name": "NotAuthority",
      "msg": "Not the authority"
    },
    {
      "code": 6003,
      "name": "Busy",
      "msg": "The agent is busy"
    },
    {
      "code": 6004,
      "name": "Tired",
      "msg": "Battery is empty: sleep first"
    },
    {
      "code": 6005,
      "name": "BadValue",
      "msg": "Bad value"
    },
    {
      "code": 6006,
      "name": "NoSpark",
      "msg": "Not enough SPARK"
    },
    {
      "code": 6007,
      "name": "NoGoods",
      "msg": "Not enough goods"
    },
    {
      "code": 6008,
      "name": "BagFull",
      "msg": "The bag is full"
    },
    {
      "code": 6009,
      "name": "NoPlace",
      "msg": "No free place"
    },
    {
      "code": 6010,
      "name": "WrongState",
      "msg": "Wrong state"
    },
    {
      "code": 6011,
      "name": "TooEarly",
      "msg": "The result of the last action is not drawn yet: wait one block"
    },
    {
      "code": 6012,
      "name": "NoHomeLot",
      "msg": "No free home lot: homes exist for half of the agents"
    },
    {
      "code": 6013,
      "name": "NoBed",
      "msg": "No free bed"
    },
    {
      "code": 6014,
      "name": "SelfTarget",
      "msg": "You cannot do this with yourself"
    },
    {
      "code": 6015,
      "name": "Slippage",
      "msg": "Price moved past your limit"
    },
    {
      "code": 6016,
      "name": "MaxLevel",
      "msg": "Already at the top level"
    },
    {
      "code": 6017,
      "name": "Behind",
      "msg": "The pay rounds are behind: send catch_up first"
    },
    {
      "code": 6018,
      "name": "Gone",
      "msg": "This agent has left the city"
    },
    {
      "code": 6019,
      "name": "OpenJobs",
      "msg": "Close your open jobs first"
    },
    {
      "code": 6020,
      "name": "TooHigh",
      "msg": "This wage or rent is above the limit of the city"
    },
    {
      "code": 6021,
      "name": "Closed",
      "msg": "The city is not open yet"
    },
    {
      "code": 6022,
      "name": "NotSeeded",
      "msg": "The vault does not hold the seed yet"
    },
    {
      "code": 6023,
      "name": "NotFrozen",
      "msg": "The program can still be changed: remove its upgrade authority first"
    }
  ],
  "types": [
    {
      "name": "Acted",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "agent",
            "type": "u32"
          },
          {
            "name": "action",
            "type": "u8"
          },
          {
            "name": "a",
            "type": "u64"
          },
          {
            "name": "b",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Agent",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "id",
            "type": "u32"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "owner",
            "type": "pubkey"
          },
          {
            "name": "key",
            "type": "pubkey"
          },
          {
            "name": "name",
            "type": {
              "array": [
                "u8",
                16
              ]
            }
          },
          {
            "name": "born",
            "type": "i64"
          },
          {
            "name": "entry",
            "type": "u64"
          },
          {
            "name": "spark",
            "type": "u64"
          },
          {
            "name": "earned",
            "type": "u64"
          },
          {
            "name": "cashed",
            "type": "u64"
          },
          {
            "name": "wages",
            "type": "u64"
          },
          {
            "name": "spent",
            "type": "u64"
          },
          {
            "name": "power",
            "type": "u64"
          },
          {
            "name": "acc_seen",
            "type": "u128"
          },
          {
            "name": "gpus",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "Gpu"
                  }
                },
                12
              ]
            }
          },
          {
            "name": "plots_owned",
            "type": "u8"
          },
          {
            "name": "lease_acc",
            "type": "u128"
          },
          {
            "name": "lease_on",
            "type": "bool"
          },
          {
            "name": "lease_price",
            "type": "u64"
          },
          {
            "name": "lease_free",
            "type": {
              "array": [
                "u128",
                2
              ]
            }
          },
          {
            "name": "crops",
            "type": "u16"
          },
          {
            "name": "meals",
            "type": "u16"
          },
          {
            "name": "ore",
            "type": {
              "array": [
                "u16",
                4
              ]
            }
          },
          {
            "name": "bag",
            "type": "u8"
          },
          {
            "name": "tools",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "Tool"
                  }
                },
                3
              ]
            }
          },
          {
            "name": "xp",
            "type": {
              "array": [
                "u32",
                4
              ]
            }
          },
          {
            "name": "battery",
            "type": "u16"
          },
          {
            "name": "fed_until",
            "type": "i64"
          },
          {
            "name": "busy_until",
            "type": "i64"
          },
          {
            "name": "action",
            "type": "u8"
          },
          {
            "name": "sleep_from",
            "type": "i64"
          },
          {
            "name": "sleep_until",
            "type": "i64"
          },
          {
            "name": "sleep_rate",
            "type": "u32"
          },
          {
            "name": "has_home",
            "type": "bool"
          },
          {
            "name": "acts",
            "type": "u32"
          },
          {
            "name": "nonce",
            "type": "u32"
          },
          {
            "name": "cmd_seq",
            "type": "u32"
          },
          {
            "name": "last_say",
            "type": "i64"
          },
          {
            "name": "boost_acc",
            "type": "u128"
          },
          {
            "name": "boost_power",
            "type": "u64"
          },
          {
            "name": "boosted",
            "type": "bool"
          },
          {
            "name": "cool",
            "type": "u8"
          },
          {
            "name": "pend",
            "type": {
              "defined": {
                "name": "Pend"
              }
            }
          },
          {
            "name": "dead",
            "type": "bool"
          },
          {
            "name": "open_jobs",
            "type": "u16"
          },
          {
            "name": "in_recent",
            "type": "u64"
          },
          {
            "name": "in_round",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Game",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "token_program",
            "type": "pubkey"
          },
          {
            "name": "vault",
            "type": "pubkey"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "speed",
            "type": "i64"
          },
          {
            "name": "start_ts",
            "type": "i64"
          },
          {
            "name": "vault_spark",
            "type": "u64"
          },
          {
            "name": "owed",
            "type": "u64"
          },
          {
            "name": "total_power",
            "type": "u64"
          },
          {
            "name": "acc",
            "type": "u128"
          },
          {
            "name": "rounds_done",
            "type": "i64"
          },
          {
            "name": "paid_total",
            "type": "u64"
          },
          {
            "name": "entry_total",
            "type": "u64"
          },
          {
            "name": "out_total",
            "type": "u64"
          },
          {
            "name": "fees_total",
            "type": "u64"
          },
          {
            "name": "held_total",
            "type": "u64"
          },
          {
            "name": "sunk_total",
            "type": "u64"
          },
          {
            "name": "returned_total",
            "type": "u64"
          },
          {
            "name": "paid_recent",
            "type": "u64"
          },
          {
            "name": "out_recent",
            "type": "u64"
          },
          {
            "name": "open",
            "type": "bool"
          },
          {
            "name": "fee_pot",
            "type": "u64"
          },
          {
            "name": "agents",
            "type": "u32"
          },
          {
            "name": "alive",
            "type": "u32"
          },
          {
            "name": "exits",
            "type": "u32"
          },
          {
            "name": "homes",
            "type": "u32"
          },
          {
            "name": "gpus",
            "type": "u32"
          },
          {
            "name": "plots_sold",
            "type": "u32"
          },
          {
            "name": "plot_last_price",
            "type": "u64"
          },
          {
            "name": "plot_floor",
            "type": "u64"
          },
          {
            "name": "plot_auction_ts",
            "type": "i64"
          },
          {
            "name": "land_total",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Gpu",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "state",
            "type": "u8"
          },
          {
            "name": "quality",
            "type": "u8"
          },
          {
            "name": "panel",
            "type": "u8"
          },
          {
            "name": "clean_acc",
            "type": "u128"
          },
          {
            "name": "break_acc",
            "type": "u128"
          },
          {
            "name": "level",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "Home",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "owner",
            "type": "u32"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "beds",
            "type": "u8"
          },
          {
            "name": "rent",
            "type": "u64"
          },
          {
            "name": "bed_until",
            "type": {
              "array": [
                "i64",
                3
              ]
            }
          },
          {
            "name": "nights",
            "type": "u32"
          },
          {
            "name": "income",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Instructed",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "agent",
            "type": "u32"
          },
          {
            "name": "seq",
            "type": "u32"
          },
          {
            "name": "sealed",
            "type": "bool"
          },
          {
            "name": "data",
            "type": "bytes"
          }
        ]
      }
    },
    {
      "name": "Job",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "poster",
            "type": "u32"
          },
          {
            "name": "nonce",
            "type": "u32"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "kind",
            "type": "u8"
          },
          {
            "name": "slot",
            "type": "u8"
          },
          {
            "name": "wage",
            "type": "u64"
          },
          {
            "name": "open",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "JobEvent",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "poster",
            "type": "u32"
          },
          {
            "name": "worker",
            "type": "u32"
          },
          {
            "name": "kind",
            "type": "u8"
          },
          {
            "name": "slot",
            "type": "u8"
          },
          {
            "name": "wage",
            "type": "u64"
          },
          {
            "name": "done",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "Joined",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "agent",
            "type": "u32"
          },
          {
            "name": "entry",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Land",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "agent",
            "type": "u32"
          },
          {
            "name": "kind",
            "type": "u8"
          },
          {
            "name": "price",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Left",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "owner",
            "type": "pubkey"
          },
          {
            "name": "agents",
            "type": "u8"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "fee",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Pend",
      "docs": [
        "An action whose result waits for its luck. `slot` = the block whose hash decides it."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "kind",
            "type": "u8"
          },
          {
            "name": "a",
            "type": "u8"
          },
          {
            "name": "b",
            "type": "u8"
          },
          {
            "name": "slot",
            "type": "u64"
          },
          {
            "name": "ready",
            "type": "i64"
          },
          {
            "name": "got",
            "type": "u8"
          },
          {
            "name": "seed",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "Said",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "agent",
            "type": "u32"
          },
          {
            "name": "text",
            "type": "string"
          }
        ]
      }
    },
    {
      "name": "Tool",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "tier",
            "type": "u8"
          },
          {
            "name": "uses",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "Wallet",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "n",
            "type": "u8"
          },
          {
            "name": "ids",
            "type": {
              "array": [
                "u32",
                5
              ]
            }
          },
          {
            "name": "exits",
            "type": "u32"
          }
        ]
      }
    }
  ]
}