{
  "address": "vELoC1audYbSYVRXn1vPaV8Axoa9oU6BYmNGZZBDZ1P",
  "metadata": {
    "name": "drift",
    "version": "2.162.0",
    "spec": "0.1.0",
    "description": "Created with Anchor"
  },
  "instructions": [
    {
      "name": "add_amm_constituent_mapping_data",
      "discriminator": [
        164,
        236,
        130,
        40,
        118,
        179,
        46,
        235
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "lp_pool"
        },
        {
          "name": "amm_constituent_mapping",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  65,
                  77,
                  77,
                  95,
                  77,
                  65,
                  80
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "constituent_target_base",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  115,
                  116,
                  105,
                  116,
                  117,
                  101,
                  110,
                  116,
                  95,
                  116,
                  97,
                  114,
                  103,
                  101,
                  116,
                  95,
                  98,
                  97,
                  115,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "state"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "amm_constituent_mapping_data",
          "type": {
            "vec": {
              "defined": {
                "name": "AddAmmConstituentMappingDatum"
              }
            }
          }
        }
      ]
    },
    {
      "name": "add_insurance_fund_stake",
      "discriminator": [
        251,
        144,
        115,
        11,
        222,
        47,
        62,
        236
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_stake",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "insurance_fund_stake",
            "user_stats"
          ]
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "user_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "add_market_to_amm_cache",
      "discriminator": [
        112,
        149,
        195,
        222,
        124,
        7,
        87,
        237
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "amm_cache",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  109,
                  109,
                  95,
                  99,
                  97,
                  99,
                  104,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              }
            ]
          }
        },
        {
          "name": "perp_market"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "admin_deposit",
      "discriminator": [
        210,
        66,
        65,
        182,
        102,
        214,
        176,
        30
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "admin_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "admin_update_user_stats_paused_operations",
      "discriminator": [
        183,
        104,
        63,
        150,
        240,
        199,
        3,
        10
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "user_stats",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "paused_operations",
          "type": "u8"
        }
      ]
    },
    {
      "name": "admin_withdraw_from_insurance_fund_vault",
      "discriminator": [
        228,
        208,
        191,
        246,
        169,
        58,
        189,
        213
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "recipient_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "drift_signer"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "begin_insurance_fund_swap",
      "discriminator": [
        176,
        69,
        143,
        205,
        32,
        132,
        163,
        0
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "out_insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "in_insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "out_token_account",
          "writable": true
        },
        {
          "name": "in_token_account",
          "writable": true
        },
        {
          "name": "if_rebalance_config",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "instructions",
          "docs": [
            "Instructions Sysvar for instruction introspection"
          ],
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "out_market_index",
          "type": "u16"
        },
        {
          "name": "amount_in",
          "type": "u64"
        }
      ]
    },
    {
      "name": "begin_lp_swap",
      "discriminator": [
        64,
        44,
        24,
        199,
        48,
        125,
        67,
        91
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "signer_out_token_account",
          "docs": [
            "Signer token accounts"
          ],
          "writable": true
        },
        {
          "name": "signer_in_token_account",
          "writable": true
        },
        {
          "name": "constituent_out_token_account",
          "docs": [
            "Constituent token accounts"
          ],
          "writable": true
        },
        {
          "name": "constituent_in_token_account",
          "writable": true
        },
        {
          "name": "out_constituent",
          "docs": [
            "Constituents"
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "in_constituent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "lp_pool"
        },
        {
          "name": "instructions",
          "docs": [
            "Instructions Sysvar for instruction introspection"
          ],
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "out_market_index",
          "type": "u16"
        },
        {
          "name": "amount_in",
          "type": "u64"
        }
      ]
    },
    {
      "name": "begin_swap",
      "discriminator": [
        174,
        109,
        228,
        1,
        242,
        105,
        232,
        105
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "out_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "in_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "out_token_account",
          "writable": true
        },
        {
          "name": "in_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "instructions",
          "docs": [
            "Instructions Sysvar for instruction introspection"
          ],
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "out_market_index",
          "type": "u16"
        },
        {
          "name": "amount_in",
          "type": "u64"
        }
      ]
    },
    {
      "name": "cancel_order",
      "discriminator": [
        95,
        129,
        237,
        240,
        8,
        49,
        223,
        132
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "order_id",
          "type": {
            "option": "u32"
          }
        }
      ]
    },
    {
      "name": "cancel_order_by_user_id",
      "discriminator": [
        107,
        211,
        250,
        133,
        18,
        37,
        57,
        100
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "user_order_id",
          "type": "u8"
        }
      ]
    },
    {
      "name": "cancel_orders",
      "discriminator": [
        238,
        225,
        95,
        158,
        227,
        103,
        8,
        194
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "market_type",
          "type": {
            "option": {
              "defined": {
                "name": "MarketType"
              }
            }
          }
        },
        {
          "name": "market_index",
          "type": {
            "option": "u16"
          }
        },
        {
          "name": "direction",
          "type": {
            "option": {
              "defined": {
                "name": "PositionDirection"
              }
            }
          }
        }
      ]
    },
    {
      "name": "cancel_orders_by_ids",
      "discriminator": [
        134,
        19,
        144,
        165,
        94,
        240,
        210,
        94
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "order_ids",
          "type": {
            "vec": "u32"
          }
        }
      ]
    },
    {
      "name": "cancel_request_remove_insurance_fund_stake",
      "discriminator": [
        97,
        235,
        78,
        62,
        212,
        42,
        241,
        127
      ],
      "accounts": [
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_stake",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "insurance_fund_stake",
            "user_stats"
          ]
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "change_approved_builder",
      "discriminator": [
        179,
        134,
        211,
        45,
        195,
        5,
        189,
        173
      ],
      "accounts": [
        {
          "name": "escrow",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  82,
                  69,
                  86,
                  95,
                  69,
                  83,
                  67,
                  82,
                  79,
                  87
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "escrow"
          ]
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "builder",
          "type": "pubkey"
        },
        {
          "name": "max_fee_bps",
          "type": "u16"
        },
        {
          "name": "add",
          "type": "bool"
        }
      ]
    },
    {
      "name": "change_signed_msg_ws_delegate_status",
      "discriminator": [
        252,
        202,
        252,
        219,
        179,
        27,
        84,
        138
      ],
      "accounts": [
        {
          "name": "signed_msg_ws_delegates",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  83,
                  73,
                  71,
                  78,
                  69,
                  68,
                  95,
                  77,
                  83,
                  71,
                  95,
                  87,
                  83
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "delegate",
          "type": "pubkey"
        },
        {
          "name": "add",
          "type": "bool"
        }
      ]
    },
    {
      "name": "delete_amm_cache",
      "discriminator": [
        216,
        130,
        215,
        206,
        233,
        232,
        191,
        88
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "amm_cache",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  109,
                  109,
                  95,
                  99,
                  97,
                  99,
                  104,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "delete_initialized_perp_market",
      "discriminator": [
        91,
        154,
        24,
        87,
        106,
        59,
        190,
        66
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "delete_initialized_spot_market",
      "discriminator": [
        31,
        140,
        67,
        191,
        189,
        20,
        101,
        221
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "spot_market",
          "writable": true
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "delete_openbook_v2_fulfillment_config",
      "discriminator": [
        18,
        198,
        138,
        142,
        138,
        48,
        79,
        187
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "openbook_v2_fulfillment_config",
          "writable": true
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        }
      ],
      "args": []
    },
    {
      "name": "delete_prelaunch_oracle",
      "discriminator": [
        59,
        169,
        100,
        49,
        69,
        17,
        173,
        253
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "prelaunch_oracle",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  101,
                  108,
                  97,
                  117,
                  110,
                  99,
                  104,
                  95,
                  111,
                  114,
                  97,
                  99,
                  108,
                  101
                ]
              },
              {
                "kind": "arg",
                "path": "perp_market_index"
              }
            ]
          }
        },
        {
          "name": "perp_market"
        },
        {
          "name": "state"
        }
      ],
      "args": [
        {
          "name": "perp_market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "delete_serum_fulfillment_config",
      "discriminator": [
        30,
        143,
        88,
        48,
        249,
        103,
        154,
        255
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "serum_fulfillment_config",
          "writable": true
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        }
      ],
      "args": []
    },
    {
      "name": "delete_signed_msg_user_orders",
      "discriminator": [
        221,
        247,
        128,
        253,
        212,
        254,
        46,
        153
      ],
      "accounts": [
        {
          "name": "signed_msg_user_orders",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  83,
                  73,
                  71,
                  78,
                  69,
                  68,
                  95,
                  77,
                  83,
                  71
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": []
    },
    {
      "name": "delete_user",
      "discriminator": [
        186,
        85,
        17,
        249,
        219,
        231,
        98,
        251
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true,
          "relations": [
            "user",
            "user_stats"
          ]
        }
      ],
      "args": []
    },
    {
      "name": "deposit",
      "discriminator": [
        242,
        35,
        198,
        137,
        82,
        225,
        242,
        182
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "user_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "reduce_only",
          "type": "bool"
        }
      ]
    },
    {
      "name": "deposit_into_insurance_fund_stake",
      "discriminator": [
        4,
        22,
        226,
        201,
        124,
        44,
        82,
        230
      ],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_stake",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  115,
                  116,
                  97,
                  107,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "user_stats"
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "user_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "drift_signer"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "deposit_into_isolated_perp_position",
      "discriminator": [
        101,
        48,
        255,
        153,
        127,
        121,
        170,
        26
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "user_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "spot_market_index",
          "type": "u16"
        },
        {
          "name": "perp_market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "deposit_into_perp_market_fee_pool",
      "discriminator": [
        34,
        58,
        57,
        68,
        97,
        80,
        244,
        6
      ],
      "accounts": [
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "source_vault",
          "writable": true
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "quote_spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "deposit_into_spot_market_revenue_pool",
      "discriminator": [
        92,
        40,
        151,
        42,
        122,
        254,
        139,
        246
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "spot_market"
              }
            ]
          }
        },
        {
          "name": "user_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "deposit_into_spot_market_vault",
      "discriminator": [
        48,
        252,
        119,
        73,
        255,
        205,
        174,
        247
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        },
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "source_vault",
          "writable": true
        },
        {
          "name": "spot_market_vault",
          "writable": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "deposit_to_program_vault",
      "discriminator": [
        235,
        171,
        121,
        80,
        57,
        239,
        147,
        220
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "constituent",
          "writable": true
        },
        {
          "name": "constituent_token_account",
          "writable": true
        },
        {
          "name": "spot_market",
          "writable": true
        },
        {
          "name": "spot_market_vault",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "mint"
        },
        {
          "name": "oracle"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "end_insurance_fund_swap",
      "discriminator": [
        206,
        230,
        98,
        8,
        249,
        158,
        169,
        167
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "out_insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "in_insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "out_token_account",
          "writable": true
        },
        {
          "name": "in_token_account",
          "writable": true
        },
        {
          "name": "if_rebalance_config",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "instructions",
          "docs": [
            "Instructions Sysvar for instruction introspection"
          ],
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "out_market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "end_lp_swap",
      "discriminator": [
        99,
        125,
        214,
        165,
        129,
        175,
        253,
        135
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "signer_out_token_account",
          "docs": [
            "Signer token accounts"
          ],
          "writable": true
        },
        {
          "name": "signer_in_token_account",
          "writable": true
        },
        {
          "name": "constituent_out_token_account",
          "docs": [
            "Constituent token accounts"
          ],
          "writable": true
        },
        {
          "name": "constituent_in_token_account",
          "writable": true
        },
        {
          "name": "out_constituent",
          "docs": [
            "Constituents"
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "in_constituent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "lp_pool"
        },
        {
          "name": "instructions",
          "docs": [
            "Instructions Sysvar for instruction introspection"
          ],
          "address": "Sysvar1nstructions1111111111111111111111111"
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "_in_market_index",
          "type": "u16"
        },
        {
          "name": "_out_market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "end_swap",
      "discriminator": [
        177,
        184,
        27,
        193,
        34,
        13,
        210,
        145
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "out_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "in_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "out_token_account",
          "writable": true
        },
        {
          "name": "in_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "instructions",
          "docs": [
            "Instructions Sysvar for instruction introspection"
          ],
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "out_market_index",
          "type": "u16"
        },
        {
          "name": "limit_price",
          "type": {
            "option": "u64"
          }
        },
        {
          "name": "reduce_only",
          "type": {
            "option": {
              "defined": {
                "name": "SwapReduceOnly"
              }
            }
          }
        }
      ]
    },
    {
      "name": "fill_perp_order",
      "discriminator": [
        13,
        188,
        248,
        103,
        134,
        217,
        106,
        240
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "filler",
          "writable": true
        },
        {
          "name": "filler_stats",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "order_id",
          "type": {
            "option": "u32"
          }
        },
        {
          "name": "_maker_order_id",
          "type": {
            "option": "u32"
          }
        }
      ]
    },
    {
      "name": "force_cancel_orders",
      "discriminator": [
        64,
        181,
        196,
        63,
        222,
        72,
        64,
        232
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "filler",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "force_delete_user",
      "discriminator": [
        2,
        241,
        195,
        172,
        227,
        24,
        254,
        158
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "authority",
          "writable": true,
          "relations": [
            "user",
            "user_stats"
          ]
        },
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "drift_signer"
        }
      ],
      "args": []
    },
    {
      "name": "initialize",
      "discriminator": [
        175,
        175,
        109,
        31,
        13,
        152,
        155,
        237
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "state",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  100,
                  114,
                  105,
                  102,
                  116,
                  95,
                  115,
                  116,
                  97,
                  116,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "quote_asset_mint"
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program"
        }
      ],
      "args": []
    },
    {
      "name": "initialize_amm_cache",
      "discriminator": [
        38,
        60,
        171,
        158,
        203,
        58,
        137,
        8
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "amm_cache",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  109,
                  109,
                  95,
                  99,
                  97,
                  99,
                  104,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              }
            ]
          }
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "initialize_constituent",
      "discriminator": [
        12,
        196,
        45,
        218,
        93,
        89,
        0,
        33
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "lp_pool",
          "writable": true
        },
        {
          "name": "constituent_target_base",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  115,
                  116,
                  105,
                  116,
                  117,
                  101,
                  110,
                  116,
                  95,
                  116,
                  97,
                  114,
                  103,
                  101,
                  116,
                  95,
                  98,
                  97,
                  115,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "constituent_correlations",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  115,
                  116,
                  105,
                  116,
                  117,
                  101,
                  110,
                  116,
                  95,
                  99,
                  111,
                  114,
                  114,
                  101,
                  108,
                  97,
                  116,
                  105,
                  111,
                  110,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "constituent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "spot_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "spot_market_mint"
        },
        {
          "name": "constituent_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84,
                  95,
                  86,
                  65,
                  85,
                  76,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "spot_market_index",
          "type": "u16"
        },
        {
          "name": "decimals",
          "type": "u8"
        },
        {
          "name": "max_weight_deviation",
          "type": "i64"
        },
        {
          "name": "swap_fee_min",
          "type": "i64"
        },
        {
          "name": "swap_fee_max",
          "type": "i64"
        },
        {
          "name": "max_borrow_token_amount",
          "type": "u64"
        },
        {
          "name": "oracle_staleness_threshold",
          "type": "u64"
        },
        {
          "name": "cost_to_trade",
          "type": "i32"
        },
        {
          "name": "constituent_derivative_index",
          "type": {
            "option": "i16"
          }
        },
        {
          "name": "constituent_derivative_depeg_threshold",
          "type": "u64"
        },
        {
          "name": "derivative_weight",
          "type": "u64"
        },
        {
          "name": "volatility",
          "type": "u64"
        },
        {
          "name": "gamma_execution",
          "type": "u8"
        },
        {
          "name": "gamma_inventory",
          "type": "u8"
        },
        {
          "name": "xi",
          "type": "u8"
        },
        {
          "name": "new_constituent_correlations",
          "type": {
            "vec": "i64"
          }
        }
      ]
    },
    {
      "name": "initialize_fuel_overflow",
      "discriminator": [
        88,
        223,
        132,
        161,
        208,
        88,
        142,
        42
      ],
      "accounts": [
        {
          "name": "fuel_overflow",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  102,
                  117,
                  101,
                  108,
                  95,
                  111,
                  118,
                  101,
                  114,
                  102,
                  108,
                  111,
                  119
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "relations": [
            "user_stats"
          ]
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "initialize_if_rebalance_config",
      "discriminator": [
        8,
        85,
        184,
        167,
        176,
        61,
        173,
        226
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "if_rebalance_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  102,
                  95,
                  114,
                  101,
                  98,
                  97,
                  108,
                  97,
                  110,
                  99,
                  101,
                  95,
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              },
              {
                "kind": "arg",
                "path": "params.in_market_index"
              },
              {
                "kind": "arg",
                "path": "params.out_market_index"
              }
            ]
          }
        },
        {
          "name": "state"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "IfRebalanceConfigParams"
            }
          }
        }
      ]
    },
    {
      "name": "initialize_insurance_fund_stake",
      "discriminator": [
        187,
        179,
        243,
        70,
        248,
        90,
        92,
        147
      ],
      "accounts": [
        {
          "name": "spot_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_stake",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  115,
                  116,
                  97,
                  107,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "user_stats"
          ]
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "initialize_lp_pool",
      "discriminator": [
        242,
        64,
        1,
        222,
        142,
        46,
        204,
        227
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "lp_pool",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  108,
                  112,
                  95,
                  112,
                  111,
                  111,
                  108
                ]
              },
              {
                "kind": "arg",
                "path": "id"
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "lp_pool_token_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  76,
                  80,
                  95,
                  80,
                  79,
                  79,
                  76,
                  95,
                  84,
                  79,
                  75,
                  69,
                  78,
                  95,
                  86,
                  65,
                  85,
                  76,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "amm_constituent_mapping",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  65,
                  77,
                  77,
                  95,
                  77,
                  65,
                  80
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "constituent_target_base",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  115,
                  116,
                  105,
                  116,
                  117,
                  101,
                  110,
                  116,
                  95,
                  116,
                  97,
                  114,
                  103,
                  101,
                  116,
                  95,
                  98,
                  97,
                  115,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "constituent_correlations",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  115,
                  116,
                  105,
                  116,
                  117,
                  101,
                  110,
                  116,
                  95,
                  99,
                  111,
                  114,
                  114,
                  101,
                  108,
                  97,
                  116,
                  105,
                  111,
                  110,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "state"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "lp_pool_id",
          "type": "u8"
        },
        {
          "name": "min_mint_fee",
          "type": "i64"
        },
        {
          "name": "max_aum",
          "type": "u128"
        },
        {
          "name": "max_settle_quote_amount_per_market",
          "type": "u64"
        },
        {
          "name": "whitelist_mint",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "initialize_openbook_v2_fulfillment_config",
      "discriminator": [
        7,
        221,
        103,
        153,
        107,
        57,
        27,
        197
      ],
      "accounts": [
        {
          "name": "base_spot_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "quote_spot_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "openbook_v2_program"
        },
        {
          "name": "openbook_v2_market"
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "openbook_v2_fulfillment_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  112,
                  101,
                  110,
                  98,
                  111,
                  111,
                  107,
                  95,
                  118,
                  50,
                  95,
                  102,
                  117,
                  108,
                  102,
                  105,
                  108,
                  108,
                  109,
                  101,
                  110,
                  116,
                  95,
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              },
              {
                "kind": "account",
                "path": "openbook_v2_market"
              }
            ]
          }
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "initialize_perp_market",
      "discriminator": [
        132,
        9,
        229,
        118,
        117,
        118,
        117,
        62
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "perp_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  101,
                  114,
                  112,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "state.number_of_markets",
                "account": "State"
              }
            ]
          }
        },
        {
          "name": "oracle"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amm_base_asset_reserve",
          "type": "u128"
        },
        {
          "name": "amm_quote_asset_reserve",
          "type": "u128"
        },
        {
          "name": "amm_periodicity",
          "type": "i64"
        },
        {
          "name": "amm_peg_multiplier",
          "type": "u128"
        },
        {
          "name": "oracle_source",
          "type": {
            "defined": {
              "name": "OracleSource"
            }
          }
        },
        {
          "name": "contract_tier",
          "type": {
            "defined": {
              "name": "ContractTier"
            }
          }
        },
        {
          "name": "margin_ratio_initial",
          "type": "u32"
        },
        {
          "name": "margin_ratio_maintenance",
          "type": "u32"
        },
        {
          "name": "liquidator_fee",
          "type": "u32"
        },
        {
          "name": "if_liquidation_fee",
          "type": "u32"
        },
        {
          "name": "imf_factor",
          "type": "u32"
        },
        {
          "name": "active_status",
          "type": "bool"
        },
        {
          "name": "base_spread",
          "type": "u32"
        },
        {
          "name": "max_spread",
          "type": "u32"
        },
        {
          "name": "max_open_interest",
          "type": "u128"
        },
        {
          "name": "max_revenue_withdraw_per_period",
          "type": "u64"
        },
        {
          "name": "quote_max_insurance",
          "type": "u64"
        },
        {
          "name": "order_step_size",
          "type": "u64"
        },
        {
          "name": "order_tick_size",
          "type": "u64"
        },
        {
          "name": "min_order_size",
          "type": "u64"
        },
        {
          "name": "concentration_coef_scale",
          "type": "u128"
        },
        {
          "name": "curve_update_intensity",
          "type": "u8"
        },
        {
          "name": "amm_jit_intensity",
          "type": "u8"
        },
        {
          "name": "name",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "lp_pool_id",
          "type": "u8"
        }
      ]
    },
    {
      "name": "initialize_phoenix_fulfillment_config",
      "discriminator": [
        135,
        132,
        110,
        107,
        185,
        160,
        169,
        154
      ],
      "accounts": [
        {
          "name": "base_spot_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "quote_spot_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "phoenix_program"
        },
        {
          "name": "phoenix_market"
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "phoenix_fulfillment_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  104,
                  111,
                  101,
                  110,
                  105,
                  120,
                  95,
                  102,
                  117,
                  108,
                  102,
                  105,
                  108,
                  108,
                  109,
                  101,
                  110,
                  116,
                  95,
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              },
              {
                "kind": "account",
                "path": "phoenix_market"
              }
            ]
          }
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "initialize_prelaunch_oracle",
      "discriminator": [
        169,
        178,
        84,
        25,
        175,
        62,
        29,
        247
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "prelaunch_oracle",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  101,
                  108,
                  97,
                  117,
                  110,
                  99,
                  104,
                  95,
                  111,
                  114,
                  97,
                  99,
                  108,
                  101
                ]
              },
              {
                "kind": "arg",
                "path": "params.perp_market_index"
              }
            ]
          }
        },
        {
          "name": "state"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "PrelaunchOracleParams"
            }
          }
        }
      ]
    },
    {
      "name": "initialize_protected_maker_mode_config",
      "discriminator": [
        67,
        103,
        220,
        67,
        88,
        32,
        252,
        8
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "protected_maker_mode_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  101,
                  99,
                  116,
                  101,
                  100,
                  95,
                  109,
                  97,
                  107,
                  101,
                  114,
                  95,
                  109,
                  111,
                  100,
                  101,
                  95,
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "state"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "max_users",
          "type": "u32"
        }
      ]
    },
    {
      "name": "initialize_pyth_lazer_oracle",
      "discriminator": [
        140,
        107,
        33,
        214,
        235,
        219,
        103,
        20
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "lazer_oracle",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  121,
                  116,
                  104,
                  95,
                  108,
                  97,
                  122,
                  101,
                  114
                ]
              },
              {
                "kind": "arg",
                "path": "feed_id"
              }
            ]
          }
        },
        {
          "name": "state"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "feed_id",
          "type": "u32"
        }
      ]
    },
    {
      "name": "initialize_referrer_name",
      "discriminator": [
        235,
        126,
        231,
        10,
        42,
        164,
        26,
        61
      ],
      "accounts": [
        {
          "name": "referrer_name",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  101,
                  102,
                  101,
                  114,
                  114,
                  101,
                  114,
                  95,
                  110,
                  97,
                  109,
                  101
                ]
              },
              {
                "kind": "arg",
                "path": "name"
              }
            ]
          }
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "name",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        }
      ]
    },
    {
      "name": "initialize_revenue_share",
      "discriminator": [
        57,
        9,
        123,
        131,
        82,
        52,
        50,
        13
      ],
      "accounts": [
        {
          "name": "revenue_share",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  82,
                  69,
                  86,
                  95,
                  83,
                  72,
                  65,
                  82,
                  69
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "authority"
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "initialize_revenue_share_escrow",
      "discriminator": [
        187,
        18,
        123,
        88,
        238,
        104,
        84,
        154
      ],
      "accounts": [
        {
          "name": "escrow",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  82,
                  69,
                  86,
                  95,
                  69,
                  83,
                  67,
                  82,
                  79,
                  87
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "authority",
          "relations": [
            "user_stats"
          ]
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "state"
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "num_orders",
          "type": "u16"
        }
      ]
    },
    {
      "name": "initialize_serum_fulfillment_config",
      "discriminator": [
        193,
        211,
        132,
        172,
        70,
        171,
        7,
        94
      ],
      "accounts": [
        {
          "name": "base_spot_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "quote_spot_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "serum_program"
        },
        {
          "name": "serum_market"
        },
        {
          "name": "serum_open_orders",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  101,
                  114,
                  117,
                  109,
                  95,
                  111,
                  112,
                  101,
                  110,
                  95,
                  111,
                  114,
                  100,
                  101,
                  114,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "serum_market"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "serum_fulfillment_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  101,
                  114,
                  117,
                  109,
                  95,
                  102,
                  117,
                  108,
                  102,
                  105,
                  108,
                  108,
                  109,
                  101,
                  110,
                  116,
                  95,
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              },
              {
                "kind": "account",
                "path": "serum_market"
              }
            ]
          }
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "initialize_signed_msg_user_orders",
      "discriminator": [
        164,
        99,
        156,
        126,
        156,
        57,
        99,
        180
      ],
      "accounts": [
        {
          "name": "signed_msg_user_orders",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  83,
                  73,
                  71,
                  78,
                  69,
                  68,
                  95,
                  77,
                  83,
                  71
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "authority"
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "num_orders",
          "type": "u16"
        }
      ]
    },
    {
      "name": "initialize_signed_msg_ws_delegates",
      "discriminator": [
        40,
        132,
        96,
        219,
        184,
        193,
        80,
        8
      ],
      "accounts": [
        {
          "name": "signed_msg_ws_delegates",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  83,
                  73,
                  71,
                  78,
                  69,
                  68,
                  95,
                  77,
                  83,
                  71,
                  95,
                  87,
                  83
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "delegates",
          "type": {
            "vec": "pubkey"
          }
        }
      ]
    },
    {
      "name": "initialize_spot_market",
      "discriminator": [
        234,
        196,
        128,
        44,
        94,
        15,
        48,
        201
      ],
      "accounts": [
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "state.number_of_spot_markets",
                "account": "State"
              }
            ]
          }
        },
        {
          "name": "spot_market_mint"
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "state.number_of_spot_markets",
                "account": "State"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "state.number_of_spot_markets",
                "account": "State"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "oracle"
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "optimal_utilization",
          "type": "u32"
        },
        {
          "name": "optimal_borrow_rate",
          "type": "u32"
        },
        {
          "name": "max_borrow_rate",
          "type": "u32"
        },
        {
          "name": "oracle_source",
          "type": {
            "defined": {
              "name": "OracleSource"
            }
          }
        },
        {
          "name": "initial_asset_weight",
          "type": "u32"
        },
        {
          "name": "maintenance_asset_weight",
          "type": "u32"
        },
        {
          "name": "initial_liability_weight",
          "type": "u32"
        },
        {
          "name": "maintenance_liability_weight",
          "type": "u32"
        },
        {
          "name": "imf_factor",
          "type": "u32"
        },
        {
          "name": "liquidator_fee",
          "type": "u32"
        },
        {
          "name": "if_liquidation_fee",
          "type": "u32"
        },
        {
          "name": "active_status",
          "type": "bool"
        },
        {
          "name": "asset_tier",
          "type": {
            "defined": {
              "name": "AssetTier"
            }
          }
        },
        {
          "name": "scale_initial_asset_weight_start",
          "type": "u64"
        },
        {
          "name": "withdraw_guard_threshold",
          "type": "u64"
        },
        {
          "name": "order_tick_size",
          "type": "u64"
        },
        {
          "name": "order_step_size",
          "type": "u64"
        },
        {
          "name": "if_total_factor",
          "type": "u32"
        },
        {
          "name": "name",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        }
      ]
    },
    {
      "name": "initialize_user",
      "discriminator": [
        111,
        17,
        185,
        250,
        60,
        122,
        38,
        254
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  117,
                  115,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              },
              {
                "kind": "arg",
                "path": "sub_account_id"
              }
            ]
          }
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "authority",
          "relations": [
            "user_stats"
          ]
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "sub_account_id",
          "type": "u16"
        },
        {
          "name": "name",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        }
      ]
    },
    {
      "name": "initialize_user_stats",
      "discriminator": [
        254,
        243,
        72,
        98,
        251,
        130,
        168,
        213
      ],
      "accounts": [
        {
          "name": "user_stats",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  117,
                  115,
                  101,
                  114,
                  95,
                  115,
                  116,
                  97,
                  116,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "authority"
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "liquidate_borrow_for_perp_pnl",
      "discriminator": [
        169,
        17,
        32,
        90,
        207,
        148,
        209,
        27
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "liquidator",
          "writable": true
        },
        {
          "name": "liquidator_stats",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "perp_market_index",
          "type": "u16"
        },
        {
          "name": "spot_market_index",
          "type": "u16"
        },
        {
          "name": "liquidator_max_liability_transfer",
          "type": "u128"
        },
        {
          "name": "limit_price",
          "type": {
            "option": "u64"
          }
        }
      ]
    },
    {
      "name": "liquidate_perp",
      "discriminator": [
        75,
        35,
        119,
        247,
        191,
        18,
        139,
        2
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "liquidator",
          "writable": true
        },
        {
          "name": "liquidator_stats",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "liquidator_max_base_asset_amount",
          "type": "u64"
        },
        {
          "name": "limit_price",
          "type": {
            "option": "u64"
          }
        }
      ]
    },
    {
      "name": "liquidate_perp_pnl_for_deposit",
      "discriminator": [
        237,
        75,
        198,
        235,
        233,
        186,
        75,
        35
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "liquidator",
          "writable": true
        },
        {
          "name": "liquidator_stats",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "perp_market_index",
          "type": "u16"
        },
        {
          "name": "spot_market_index",
          "type": "u16"
        },
        {
          "name": "liquidator_max_pnl_transfer",
          "type": "u128"
        },
        {
          "name": "limit_price",
          "type": {
            "option": "u64"
          }
        }
      ]
    },
    {
      "name": "liquidate_perp_with_fill",
      "discriminator": [
        95,
        111,
        124,
        105,
        86,
        169,
        187,
        34
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "liquidator",
          "writable": true
        },
        {
          "name": "liquidator_stats",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "liquidate_spot",
      "discriminator": [
        107,
        0,
        128,
        41,
        35,
        229,
        251,
        18
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "liquidator",
          "writable": true
        },
        {
          "name": "liquidator_stats",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "asset_market_index",
          "type": "u16"
        },
        {
          "name": "liability_market_index",
          "type": "u16"
        },
        {
          "name": "liquidator_max_liability_transfer",
          "type": "u128"
        },
        {
          "name": "limit_price",
          "type": {
            "option": "u64"
          }
        }
      ]
    },
    {
      "name": "liquidate_spot_with_swap_begin",
      "discriminator": [
        12,
        43,
        176,
        83,
        156,
        251,
        117,
        13
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "liquidator",
          "writable": true
        },
        {
          "name": "liquidator_stats",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "liability_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "liability_market_index"
              }
            ]
          }
        },
        {
          "name": "asset_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "asset_market_index"
              }
            ]
          }
        },
        {
          "name": "liability_token_account",
          "writable": true
        },
        {
          "name": "asset_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "instructions",
          "docs": [
            "Instructions Sysvar for instruction introspection"
          ],
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "asset_market_index",
          "type": "u16"
        },
        {
          "name": "liability_market_index",
          "type": "u16"
        },
        {
          "name": "swap_amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "liquidate_spot_with_swap_end",
      "discriminator": [
        142,
        88,
        163,
        160,
        223,
        75,
        55,
        225
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "liquidator",
          "writable": true
        },
        {
          "name": "liquidator_stats",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "liability_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "liability_market_index"
              }
            ]
          }
        },
        {
          "name": "asset_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "asset_market_index"
              }
            ]
          }
        },
        {
          "name": "liability_token_account",
          "writable": true
        },
        {
          "name": "asset_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "instructions",
          "docs": [
            "Instructions Sysvar for instruction introspection"
          ],
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "asset_market_index",
          "type": "u16"
        },
        {
          "name": "liability_market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "log_user_balances",
      "discriminator": [
        162,
        21,
        35,
        251,
        32,
        57,
        161,
        210
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "user",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "lp_pool_add_liquidity",
      "discriminator": [
        49,
        135,
        246,
        103,
        93,
        146,
        220,
        141
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "lp_pool",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "in_market_mint"
        },
        {
          "name": "in_constituent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "user_in_token_account",
          "writable": true
        },
        {
          "name": "constituent_in_token_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84,
                  95,
                  86,
                  65,
                  85,
                  76,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "user_lp_token_account",
          "writable": true
        },
        {
          "name": "lp_mint",
          "writable": true
        },
        {
          "name": "constituent_target_base"
        },
        {
          "name": "lp_pool_token_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  76,
                  80,
                  95,
                  80,
                  79,
                  79,
                  76,
                  95,
                  84,
                  79,
                  75,
                  69,
                  78,
                  95,
                  86,
                  65,
                  85,
                  76,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "in_amount",
          "type": "u128"
        },
        {
          "name": "min_mint_amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "lp_pool_remove_liquidity",
      "discriminator": [
        164,
        36,
        193,
        252,
        196,
        157,
        138,
        43
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "lp_pool",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "out_market_mint"
        },
        {
          "name": "out_constituent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "user_out_token_account",
          "writable": true
        },
        {
          "name": "constituent_out_token_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84,
                  95,
                  86,
                  65,
                  85,
                  76,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "user_lp_token_account",
          "writable": true
        },
        {
          "name": "spot_market_token_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "lp_mint",
          "writable": true
        },
        {
          "name": "constituent_target_base"
        },
        {
          "name": "lp_pool_token_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  76,
                  80,
                  95,
                  80,
                  79,
                  79,
                  76,
                  95,
                  84,
                  79,
                  75,
                  69,
                  78,
                  95,
                  86,
                  65,
                  85,
                  76,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "token_program"
        },
        {
          "name": "amm_cache",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  109,
                  109,
                  95,
                  99,
                  97,
                  99,
                  104,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "in_amount",
          "type": "u64"
        },
        {
          "name": "min_out_amount",
          "type": "u128"
        }
      ]
    },
    {
      "name": "lp_pool_swap",
      "discriminator": [
        36,
        161,
        39,
        49,
        227,
        1,
        35,
        226
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "lp_pool"
        },
        {
          "name": "constituent_target_base"
        },
        {
          "name": "constituent_correlations"
        },
        {
          "name": "constituent_in_token_account",
          "writable": true
        },
        {
          "name": "constituent_out_token_account",
          "writable": true
        },
        {
          "name": "user_in_token_account",
          "writable": true
        },
        {
          "name": "user_out_token_account",
          "writable": true
        },
        {
          "name": "in_constituent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "out_constituent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "in_market_mint"
        },
        {
          "name": "out_market_mint"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "out_market_index",
          "type": "u16"
        },
        {
          "name": "in_amount",
          "type": "u64"
        },
        {
          "name": "min_out_amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "modify_order",
      "discriminator": [
        47,
        124,
        117,
        255,
        201,
        197,
        130,
        94
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "order_id",
          "type": {
            "option": "u32"
          }
        },
        {
          "name": "modify_order_params",
          "type": {
            "defined": {
              "name": "ModifyOrderParams"
            }
          }
        }
      ]
    },
    {
      "name": "modify_order_by_user_id",
      "discriminator": [
        158,
        77,
        4,
        253,
        252,
        194,
        161,
        179
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "user_order_id",
          "type": "u8"
        },
        {
          "name": "modify_order_params",
          "type": {
            "defined": {
              "name": "ModifyOrderParams"
            }
          }
        }
      ]
    },
    {
      "name": "move_amm_price",
      "discriminator": [
        235,
        109,
        2,
        82,
        219,
        118,
        6,
        159
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "base_asset_reserve",
          "type": "u128"
        },
        {
          "name": "quote_asset_reserve",
          "type": "u128"
        },
        {
          "name": "sqrt_k",
          "type": "u128"
        }
      ]
    },
    {
      "name": "openbook_v2_fulfillment_config_status",
      "discriminator": [
        25,
        173,
        19,
        189,
        4,
        211,
        64,
        238
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "openbook_v2_fulfillment_config",
          "writable": true
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        }
      ],
      "args": [
        {
          "name": "status",
          "type": {
            "defined": {
              "name": "SpotFulfillmentConfigStatus"
            }
          }
        }
      ]
    },
    {
      "name": "override_amm_cache_info",
      "discriminator": [
        189,
        198,
        128,
        9,
        49,
        145,
        201,
        115
      ],
      "accounts": [
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "amm_cache",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  109,
                  109,
                  95,
                  99,
                  97,
                  99,
                  104,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "override_params",
          "type": {
            "defined": {
              "name": "OverrideAmmCacheParams"
            }
          }
        }
      ]
    },
    {
      "name": "pause_spot_market_deposit_withdraw",
      "discriminator": [
        183,
        119,
        59,
        170,
        137,
        35,
        242,
        86
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "keeper",
          "signer": true
        },
        {
          "name": "spot_market",
          "writable": true
        },
        {
          "name": "spot_market_vault",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "spot_market"
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "phoenix_fulfillment_config_status",
      "discriminator": [
        96,
        31,
        113,
        32,
        12,
        203,
        7,
        154
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "phoenix_fulfillment_config",
          "writable": true
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        }
      ],
      "args": [
        {
          "name": "status",
          "type": {
            "defined": {
              "name": "SpotFulfillmentConfigStatus"
            }
          }
        }
      ]
    },
    {
      "name": "place_and_make_perp_order",
      "discriminator": [
        149,
        117,
        11,
        237,
        47,
        95,
        89,
        237
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "taker",
          "writable": true
        },
        {
          "name": "taker_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "OrderParams"
            }
          }
        },
        {
          "name": "taker_order_id",
          "type": "u32"
        }
      ]
    },
    {
      "name": "place_and_make_signed_msg_perp_order",
      "discriminator": [
        16,
        26,
        123,
        131,
        94,
        29,
        175,
        98
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "taker",
          "writable": true
        },
        {
          "name": "taker_stats",
          "writable": true
        },
        {
          "name": "taker_signed_msg_user_orders",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  83,
                  73,
                  71,
                  78,
                  69,
                  68,
                  95,
                  77,
                  83,
                  71
                ]
              },
              {
                "kind": "account",
                "path": "taker"
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "OrderParams"
            }
          }
        },
        {
          "name": "signed_msg_order_uuid",
          "type": {
            "array": [
              "u8",
              8
            ]
          }
        }
      ]
    },
    {
      "name": "place_and_take_perp_order",
      "discriminator": [
        213,
        51,
        1,
        187,
        108,
        220,
        230,
        224
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "OrderParams"
            }
          }
        },
        {
          "name": "success_condition",
          "type": {
            "option": "u32"
          }
        }
      ]
    },
    {
      "name": "place_orders",
      "discriminator": [
        60,
        63,
        50,
        123,
        12,
        197,
        60,
        190
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "vec": {
              "defined": {
                "name": "OrderParams"
              }
            }
          }
        }
      ]
    },
    {
      "name": "place_perp_order",
      "discriminator": [
        69,
        161,
        93,
        202,
        120,
        126,
        76,
        185
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "OrderParams"
            }
          }
        }
      ]
    },
    {
      "name": "place_scale_orders",
      "discriminator": [
        129,
        249,
        70,
        55,
        177,
        250,
        252,
        94
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "ScaleOrderParams"
            }
          }
        }
      ]
    },
    {
      "name": "place_signed_msg_taker_order",
      "discriminator": [
        32,
        79,
        101,
        139,
        25,
        6,
        98,
        15
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "signed_msg_user_orders",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  83,
                  73,
                  71,
                  78,
                  69,
                  68,
                  95,
                  77,
                  83,
                  71
                ]
              },
              {
                "kind": "account",
                "path": "user"
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "ix_sysvar",
          "docs": [
            "the supplied Sysvar could be anything else.",
            "The Instruction Sysvar has not been implemented",
            "in the Anchor framework yet, so this is the safe approach."
          ],
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "signed_msg_order_params_message_bytes",
          "type": "bytes"
        },
        {
          "name": "is_delegate_signer",
          "type": "bool"
        }
      ]
    },
    {
      "name": "post_pyth_lazer_oracle_update",
      "discriminator": [
        218,
        237,
        170,
        245,
        39,
        143,
        166,
        33
      ],
      "accounts": [
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "pyth_lazer_storage",
          "address": "3rdJbqfnagQ4yx9HXJViD4zc4xpiSqmFsKpPuSCQVyQL"
        },
        {
          "name": "ix_sysvar",
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "pyth_message",
          "type": "bytes"
        }
      ]
    },
    {
      "name": "recenter_perp_market_amm",
      "discriminator": [
        24,
        87,
        10,
        115,
        165,
        190,
        80,
        139
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "peg_multiplier",
          "type": "u128"
        },
        {
          "name": "sqrt_k",
          "type": "u128"
        }
      ]
    },
    {
      "name": "recenter_perp_market_amm_crank",
      "discriminator": [
        166,
        19,
        64,
        10,
        14,
        51,
        101,
        122
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "spot_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "perp_market"
              }
            ]
          }
        },
        {
          "name": "oracle"
        }
      ],
      "args": [
        {
          "name": "depth",
          "type": {
            "option": "u128"
          }
        }
      ]
    },
    {
      "name": "reclaim_rent",
      "discriminator": [
        218,
        200,
        19,
        197,
        227,
        89,
        192,
        22
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "user",
            "user_stats"
          ]
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "remove_amm_constituent_mapping_data",
      "discriminator": [
        20,
        183,
        211,
        162,
        16,
        52,
        229,
        115
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "lp_pool"
        },
        {
          "name": "amm_constituent_mapping",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  65,
                  77,
                  77,
                  95,
                  77,
                  65,
                  80
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "state"
        }
      ],
      "args": [
        {
          "name": "perp_market_index",
          "type": "u16"
        },
        {
          "name": "constituent_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "remove_insurance_fund_stake",
      "discriminator": [
        128,
        166,
        142,
        9,
        254,
        187,
        143,
        174
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_stake",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "insurance_fund_stake",
            "user_stats"
          ]
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "user_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "repeg_amm_curve",
      "discriminator": [
        3,
        36,
        102,
        89,
        180,
        128,
        120,
        213
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "oracle"
        },
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        }
      ],
      "args": [
        {
          "name": "new_peg_candidate",
          "type": "u128"
        }
      ]
    },
    {
      "name": "request_remove_insurance_fund_stake",
      "discriminator": [
        142,
        70,
        204,
        92,
        73,
        106,
        180,
        52
      ],
      "accounts": [
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_stake",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "insurance_fund_stake",
            "user_stats"
          ]
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "reset_fuel_season",
      "discriminator": [
        199,
        122,
        192,
        255,
        32,
        99,
        63,
        200
      ],
      "accounts": [
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "relations": [
            "user_stats"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "admin",
          "signer": true
        }
      ],
      "args": []
    },
    {
      "name": "reset_perp_market_amm_oracle_twap",
      "discriminator": [
        127,
        10,
        55,
        164,
        123,
        226,
        47,
        24
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "oracle"
        },
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        }
      ],
      "args": []
    },
    {
      "name": "resize_revenue_share_escrow_orders",
      "discriminator": [
        32,
        124,
        247,
        225,
        151,
        213,
        225,
        38
      ],
      "accounts": [
        {
          "name": "escrow",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  82,
                  69,
                  86,
                  95,
                  69,
                  83,
                  67,
                  82,
                  79,
                  87
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "authority",
          "relations": [
            "escrow"
          ]
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "num_orders",
          "type": "u16"
        }
      ]
    },
    {
      "name": "resize_signed_msg_user_orders",
      "discriminator": [
        137,
        10,
        87,
        150,
        18,
        115,
        79,
        168
      ],
      "accounts": [
        {
          "name": "signed_msg_user_orders",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  83,
                  73,
                  71,
                  78,
                  69,
                  68,
                  95,
                  77,
                  83,
                  71
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              }
            ]
          }
        },
        {
          "name": "authority",
          "relations": [
            "user"
          ]
        },
        {
          "name": "user"
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "num_orders",
          "type": "u16"
        }
      ]
    },
    {
      "name": "resolve_perp_bankruptcy",
      "discriminator": [
        224,
        16,
        176,
        214,
        162,
        213,
        183,
        222
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "liquidator",
          "writable": true
        },
        {
          "name": "liquidator_stats",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "quote_spot_market_index",
          "type": "u16"
        },
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "resolve_perp_pnl_deficit",
      "discriminator": [
        168,
        204,
        68,
        150,
        159,
        126,
        95,
        148
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "spot_market_index",
          "type": "u16"
        },
        {
          "name": "perp_market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "resolve_spot_bankruptcy",
      "discriminator": [
        124,
        194,
        240,
        254,
        198,
        213,
        52,
        122
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "liquidator",
          "writable": true
        },
        {
          "name": "liquidator_stats",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "revert_fill",
      "discriminator": [
        236,
        238,
        176,
        69,
        239,
        10,
        181,
        193
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "filler",
          "writable": true
        },
        {
          "name": "filler_stats",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "set_user_status_to_being_liquidated",
      "discriminator": [
        106,
        133,
        160,
        206,
        193,
        171,
        192,
        194
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": []
    },
    {
      "name": "settle_expired_market",
      "discriminator": [
        120,
        89,
        11,
        25,
        122,
        77,
        72,
        193
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "settle_expired_market_pools_to_revenue_pool",
      "discriminator": [
        55,
        19,
        238,
        169,
        227,
        90,
        200,
        184
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "settle_funding_payment",
      "discriminator": [
        222,
        90,
        202,
        94,
        28,
        45,
        115,
        183
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "settle_multiple_pnls",
      "discriminator": [
        127,
        66,
        117,
        57,
        40,
        50,
        152,
        127
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "spot_market_vault",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "market_indexes",
          "type": {
            "vec": "u16"
          }
        },
        {
          "name": "mode",
          "type": {
            "defined": {
              "name": "SettlePnlMode"
            }
          }
        }
      ]
    },
    {
      "name": "settle_perp_to_lp_pool",
      "discriminator": [
        5,
        98,
        46,
        188,
        10,
        59,
        2,
        249
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "lp_pool",
          "writable": true
        },
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "amm_cache",
          "writable": true
        },
        {
          "name": "quote_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "constituent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "constituent_quote_token_account",
          "writable": true
        },
        {
          "name": "quote_token_vault",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "drift_signer"
        }
      ],
      "args": []
    },
    {
      "name": "settle_pnl",
      "discriminator": [
        43,
        61,
        234,
        45,
        15,
        95,
        152,
        153
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "spot_market_vault",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "settle_revenue_to_insurance_fund",
      "discriminator": [
        200,
        120,
        93,
        136,
        69,
        38,
        199,
        159
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "spot_market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "special_transfer_perp_position_to_vamm",
      "discriminator": [
        39,
        111,
        187,
        243,
        18,
        139,
        223,
        1
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "state"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": {
            "option": "i64"
          }
        }
      ]
    },
    {
      "name": "sweep_fuel",
      "discriminator": [
        175,
        107,
        19,
        56,
        165,
        241,
        43,
        69
      ],
      "accounts": [
        {
          "name": "fuel_overflow",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "relations": [
            "fuel_overflow",
            "user_stats"
          ]
        },
        {
          "name": "signer",
          "signer": true
        }
      ],
      "args": []
    },
    {
      "name": "transfer_deposit",
      "discriminator": [
        20,
        20,
        147,
        223,
        41,
        63,
        204,
        111
      ],
      "accounts": [
        {
          "name": "from_user",
          "writable": true
        },
        {
          "name": "to_user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "from_user",
            "to_user",
            "user_stats"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market_vault",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "transfer_fee_and_pnl_pool",
      "discriminator": [
        167,
        110,
        96,
        211,
        215,
        250,
        115,
        39
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "perp_market_with_fee_pool",
          "writable": true
        },
        {
          "name": "perp_market_with_pnl_pool",
          "writable": true
        },
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "direction",
          "type": {
            "defined": {
              "name": "TransferFeeAndPnlPoolDirection"
            }
          }
        }
      ]
    },
    {
      "name": "transfer_isolated_perp_position_deposit",
      "discriminator": [
        201,
        131,
        242,
        228,
        85,
        226,
        70,
        237
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market_vault",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "spot_market_index",
          "type": "u16"
        },
        {
          "name": "perp_market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "i64"
        }
      ]
    },
    {
      "name": "transfer_perp_position",
      "discriminator": [
        23,
        172,
        188,
        168,
        134,
        210,
        3,
        108
      ],
      "accounts": [
        {
          "name": "from_user",
          "writable": true
        },
        {
          "name": "to_user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "state"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": {
            "option": "i64"
          }
        }
      ]
    },
    {
      "name": "transfer_pools",
      "discriminator": [
        197,
        103,
        154,
        25,
        107,
        90,
        60,
        94
      ],
      "accounts": [
        {
          "name": "from_user",
          "writable": true
        },
        {
          "name": "to_user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "from_user",
            "to_user",
            "user_stats"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "deposit_from_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "deposit_from_market_index"
              }
            ]
          }
        },
        {
          "name": "deposit_to_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "deposit_to_market_index"
              }
            ]
          }
        },
        {
          "name": "borrow_from_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "borrow_from_market_index"
              }
            ]
          }
        },
        {
          "name": "borrow_to_spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "borrow_to_market_index"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        }
      ],
      "args": [
        {
          "name": "deposit_from_market_index",
          "type": "u16"
        },
        {
          "name": "deposit_to_market_index",
          "type": "u16"
        },
        {
          "name": "borrow_from_market_index",
          "type": "u16"
        },
        {
          "name": "borrow_to_market_index",
          "type": "u16"
        },
        {
          "name": "deposit_amount",
          "type": {
            "option": "u64"
          }
        },
        {
          "name": "borrow_amount",
          "type": {
            "option": "u64"
          }
        }
      ]
    },
    {
      "name": "transfer_protocol_if_shares_to_revenue_pool",
      "discriminator": [
        236,
        136,
        147,
        153,
        146,
        205,
        104,
        29
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "if_rebalance_config",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "drift_signer"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "trigger_order",
      "discriminator": [
        63,
        112,
        51,
        233,
        232,
        47,
        240,
        199
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "filler",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "order_id",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_admin",
      "discriminator": [
        161,
        176,
        40,
        213,
        60,
        184,
        179,
        228
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "admin",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "update_amm_cache",
      "discriminator": [
        88,
        4,
        63,
        94,
        83,
        224,
        255,
        130
      ],
      "accounts": [
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "amm_cache",
          "writable": true
        },
        {
          "name": "quote_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "update_amm_constituent_mapping_data",
      "discriminator": [
        84,
        70,
        33,
        167,
        133,
        107,
        59,
        24
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "lp_pool"
        },
        {
          "name": "amm_constituent_mapping",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  65,
                  77,
                  77,
                  95,
                  77,
                  65,
                  80
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "state"
        }
      ],
      "args": [
        {
          "name": "amm_constituent_mapping_data",
          "type": {
            "vec": {
              "defined": {
                "name": "AddAmmConstituentMappingDatum"
              }
            }
          }
        }
      ]
    },
    {
      "name": "update_amm_jit_intensity",
      "discriminator": [
        181,
        191,
        53,
        109,
        166,
        249,
        55,
        142
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "amm_jit_intensity",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_amms",
      "discriminator": [
        201,
        106,
        217,
        253,
        4,
        175,
        228,
        97
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "market_indexes",
          "type": {
            "vec": "u16"
          }
        }
      ]
    },
    {
      "name": "update_constituent_correlation_data",
      "discriminator": [
        79,
        14,
        19,
        73,
        221,
        106,
        62,
        109
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "lp_pool"
        },
        {
          "name": "constituent_correlations",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  115,
                  116,
                  105,
                  116,
                  117,
                  101,
                  110,
                  116,
                  95,
                  99,
                  111,
                  114,
                  114,
                  101,
                  108,
                  97,
                  116,
                  105,
                  111,
                  110,
                  115
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "state"
        }
      ],
      "args": [
        {
          "name": "index1",
          "type": "u16"
        },
        {
          "name": "index2",
          "type": "u16"
        },
        {
          "name": "correlation",
          "type": "i64"
        }
      ]
    },
    {
      "name": "update_constituent_oracle_info",
      "discriminator": [
        198,
        117,
        231,
        250,
        147,
        33,
        127,
        161
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "constituent",
          "writable": true
        },
        {
          "name": "spot_market"
        },
        {
          "name": "oracle"
        }
      ],
      "args": []
    },
    {
      "name": "update_constituent_params",
      "discriminator": [
        238,
        130,
        122,
        31,
        12,
        104,
        192,
        122
      ],
      "accounts": [
        {
          "name": "lp_pool"
        },
        {
          "name": "constituent_target_base",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  110,
                  115,
                  116,
                  105,
                  116,
                  117,
                  101,
                  110,
                  116,
                  95,
                  116,
                  97,
                  114,
                  103,
                  101,
                  116,
                  95,
                  98,
                  97,
                  115,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              }
            ]
          }
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "constituent",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "constituent_params",
          "type": {
            "defined": {
              "name": "ConstituentParams"
            }
          }
        }
      ]
    },
    {
      "name": "update_constituent_paused_operations",
      "discriminator": [
        185,
        122,
        153,
        191,
        131,
        177,
        132,
        208
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "constituent",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "paused_operations",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_constituent_status",
      "discriminator": [
        76,
        159,
        211,
        239,
        182,
        214,
        6,
        15
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "constituent",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "new_status",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_delegate_user_gov_token_insurance_stake",
      "discriminator": [
        241,
        29,
        215,
        228,
        142,
        116,
        22,
        160
      ],
      "accounts": [
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  15,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "insurance_fund_stake"
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  15,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "state"
        }
      ],
      "args": []
    },
    {
      "name": "update_discount_mint",
      "discriminator": [
        32,
        252,
        122,
        211,
        66,
        31,
        47,
        241
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "discount_mint",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "update_exchange_status",
      "discriminator": [
        83,
        160,
        252,
        250,
        129,
        116,
        49,
        223
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "exchange_status",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_feature_bit_flags_builder_codes",
      "discriminator": [
        1,
        128,
        177,
        51,
        173,
        45,
        11,
        102
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "enable",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_feature_bit_flags_median_trigger_price",
      "discriminator": [
        64,
        185,
        221,
        45,
        87,
        147,
        12,
        19
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "enable",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_feature_bit_flags_mint_redeem_lp_pool",
      "discriminator": [
        26,
        11,
        142,
        122,
        206,
        159,
        9,
        45
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "enable",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_feature_bit_flags_mm_oracle",
      "discriminator": [
        218,
        134,
        33,
        186,
        231,
        59,
        130,
        149
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "enable",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_feature_bit_flags_settle_lp_pool",
      "discriminator": [
        186,
        28,
        78,
        230,
        155,
        83,
        242,
        26
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "enable",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_feature_bit_flags_swap_lp_pool",
      "discriminator": [
        83,
        16,
        150,
        12,
        102,
        3,
        22,
        58
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "enable",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_funding_rate",
      "discriminator": [
        201,
        178,
        116,
        212,
        166,
        144,
        72,
        238
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "oracle"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "update_if_rebalance_config",
      "discriminator": [
        142,
        245,
        249,
        66,
        249,
        181,
        22,
        83
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "if_rebalance_config",
          "writable": true
        },
        {
          "name": "state"
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "IfRebalanceConfigParams"
            }
          }
        }
      ]
    },
    {
      "name": "update_initial_amm_cache_info",
      "discriminator": [
        157,
        210,
        109,
        67,
        212,
        170,
        12,
        107
      ],
      "accounts": [
        {
          "name": "state",
          "writable": true
        },
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "amm_cache",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  109,
                  109,
                  95,
                  99,
                  97,
                  99,
                  104,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "update_initial_pct_to_liquidate",
      "discriminator": [
        210,
        133,
        225,
        128,
        194,
        50,
        13,
        109
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "initial_pct_to_liquidate",
          "type": "u16"
        }
      ]
    },
    {
      "name": "update_insurance_fund_unstaking_period",
      "discriminator": [
        44,
        69,
        43,
        226,
        204,
        223,
        202,
        52
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "insurance_fund_unstaking_period",
          "type": "i64"
        }
      ]
    },
    {
      "name": "update_k",
      "discriminator": [
        72,
        98,
        9,
        139,
        129,
        229,
        172,
        56
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "oracle"
        }
      ],
      "args": [
        {
          "name": "sqrt_k",
          "type": "u128"
        }
      ]
    },
    {
      "name": "update_liquidation_duration",
      "discriminator": [
        28,
        154,
        20,
        249,
        102,
        192,
        73,
        71
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "liquidation_duration",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_liquidation_margin_buffer_ratio",
      "discriminator": [
        132,
        224,
        243,
        160,
        154,
        82,
        97,
        215
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "liquidation_margin_buffer_ratio",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_lp_constituent_target_base",
      "discriminator": [
        157,
        65,
        50,
        207,
        59,
        236,
        161,
        110
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "amm_constituent_mapping"
        },
        {
          "name": "constituent_target_base",
          "writable": true
        },
        {
          "name": "amm_cache"
        },
        {
          "name": "lp_pool"
        }
      ],
      "args": []
    },
    {
      "name": "update_lp_pool_aum",
      "discriminator": [
        88,
        113,
        137,
        206,
        246,
        247,
        171,
        142
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "keeper",
          "writable": true,
          "signer": true
        },
        {
          "name": "lp_pool",
          "writable": true
        },
        {
          "name": "constituent_target_base",
          "writable": true
        },
        {
          "name": "amm_cache",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "update_lp_pool_params",
      "discriminator": [
        217,
        92,
        2,
        255,
        27,
        167,
        178,
        81
      ],
      "accounts": [
        {
          "name": "lp_pool",
          "writable": true
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "state"
        }
      ],
      "args": [
        {
          "name": "lp_pool_params",
          "type": {
            "defined": {
              "name": "LpPoolParams"
            }
          }
        }
      ]
    },
    {
      "name": "update_oracle_guard_rails",
      "discriminator": [
        131,
        112,
        10,
        59,
        32,
        54,
        40,
        164
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "oracle_guard_rails",
          "type": {
            "defined": {
              "name": "OracleGuardRails"
            }
          }
        }
      ]
    },
    {
      "name": "update_perp_auction_duration",
      "discriminator": [
        126,
        110,
        52,
        174,
        30,
        206,
        215,
        90
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "min_perp_auction_duration",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_perp_bid_ask_twap",
      "discriminator": [
        247,
        23,
        255,
        65,
        212,
        90,
        221,
        194
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "oracle"
        },
        {
          "name": "keeper_stats"
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": []
    },
    {
      "name": "update_perp_fee_structure",
      "discriminator": [
        23,
        178,
        111,
        203,
        73,
        22,
        140,
        75
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "fee_structure",
          "type": {
            "defined": {
              "name": "FeeStructure"
            }
          }
        }
      ]
    },
    {
      "name": "update_perp_market_amm_oracle_twap",
      "discriminator": [
        241,
        74,
        114,
        123,
        206,
        153,
        24,
        202
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "oracle"
        },
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        }
      ],
      "args": []
    },
    {
      "name": "update_perp_market_amm_spread_adjustment",
      "discriminator": [
        155,
        195,
        149,
        43,
        220,
        82,
        173,
        205
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "amm_spread_adjustment",
          "type": "i8"
        },
        {
          "name": "amm_inventory_spread_adjustment",
          "type": "i8"
        },
        {
          "name": "reference_price_offset",
          "type": "i32"
        }
      ]
    },
    {
      "name": "update_perp_market_amm_summary_stats",
      "discriminator": [
        122,
        101,
        249,
        238,
        209,
        9,
        241,
        245
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "spot_market",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "perp_market"
              }
            ]
          }
        },
        {
          "name": "oracle"
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "UpdatePerpMarketSummaryStatsParams"
            }
          }
        }
      ]
    },
    {
      "name": "update_perp_market_base_spread",
      "discriminator": [
        71,
        95,
        84,
        168,
        9,
        157,
        198,
        65
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "base_spread",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_perp_market_concentration_coef",
      "discriminator": [
        24,
        78,
        232,
        126,
        169,
        176,
        230,
        16
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "concentration_scale",
          "type": "u128"
        }
      ]
    },
    {
      "name": "update_perp_market_config",
      "discriminator": [
        134,
        90,
        6,
        34,
        80,
        160,
        94,
        245
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "market_config",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_perp_market_contract_tier",
      "discriminator": [
        236,
        128,
        15,
        95,
        203,
        214,
        68,
        117
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "contract_tier",
          "type": {
            "defined": {
              "name": "ContractTier"
            }
          }
        }
      ]
    },
    {
      "name": "update_perp_market_curve_update_intensity",
      "discriminator": [
        50,
        131,
        6,
        156,
        226,
        231,
        189,
        72
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "curve_update_intensity",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_perp_market_expiry",
      "discriminator": [
        44,
        221,
        227,
        151,
        131,
        140,
        22,
        110
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "expiry_ts",
          "type": "i64"
        }
      ]
    },
    {
      "name": "update_perp_market_fee_adjustment",
      "discriminator": [
        194,
        174,
        87,
        102,
        43,
        148,
        32,
        112
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "fee_adjustment",
          "type": "i16"
        }
      ]
    },
    {
      "name": "update_perp_market_funding_period",
      "discriminator": [
        171,
        161,
        69,
        91,
        129,
        139,
        161,
        28
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "funding_period",
          "type": "i64"
        }
      ]
    },
    {
      "name": "update_perp_market_imf_factor",
      "discriminator": [
        207,
        194,
        56,
        132,
        35,
        67,
        71,
        244
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "imf_factor",
          "type": "u32"
        },
        {
          "name": "unrealized_pnl_imf_factor",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_perp_market_liquidation_fee",
      "discriminator": [
        90,
        137,
        9,
        145,
        41,
        8,
        148,
        117
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "liquidator_fee",
          "type": "u32"
        },
        {
          "name": "if_liquidation_fee",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_perp_market_lp_pool_fee_transfer_scalar",
      "discriminator": [
        94,
        228,
        237,
        109,
        100,
        185,
        4,
        81
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "optional_lp_fee_transfer_scalar",
          "type": {
            "option": "u8"
          }
        },
        {
          "name": "optional_lp_net_pnl_transfer_scalar",
          "type": {
            "option": "u8"
          }
        }
      ]
    },
    {
      "name": "update_perp_market_lp_pool_id",
      "discriminator": [
        119,
        208,
        154,
        88,
        165,
        92,
        21,
        188
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "lp_pool_id",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_perp_market_lp_pool_paused_operations",
      "discriminator": [
        181,
        94,
        93,
        146,
        51,
        89,
        32,
        135
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "lp_paused_operations",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_perp_market_lp_pool_status",
      "discriminator": [
        67,
        6,
        252,
        61,
        54,
        88,
        89,
        233
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "amm_cache",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  109,
                  109,
                  95,
                  99,
                  97,
                  99,
                  104,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "lp_status",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_perp_market_margin_ratio",
      "discriminator": [
        130,
        173,
        107,
        45,
        119,
        105,
        26,
        113
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "margin_ratio_initial",
          "type": "u32"
        },
        {
          "name": "margin_ratio_maintenance",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_perp_market_max_fill_reserve_fraction",
      "discriminator": [
        19,
        172,
        114,
        154,
        42,
        135,
        161,
        133
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "max_fill_reserve_fraction",
          "type": "u16"
        }
      ]
    },
    {
      "name": "update_perp_market_max_imbalances",
      "discriminator": [
        15,
        206,
        73,
        133,
        60,
        8,
        86,
        89
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "unrealized_max_imbalance",
          "type": "u64"
        },
        {
          "name": "max_revenue_withdraw_per_period",
          "type": "u64"
        },
        {
          "name": "quote_max_insurance",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_perp_market_max_open_interest",
      "discriminator": [
        194,
        79,
        149,
        224,
        246,
        102,
        186,
        140
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "max_open_interest",
          "type": "u128"
        }
      ]
    },
    {
      "name": "update_perp_market_max_slippage_ratio",
      "discriminator": [
        235,
        37,
        40,
        196,
        70,
        146,
        54,
        201
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "max_slippage_ratio",
          "type": "u16"
        }
      ]
    },
    {
      "name": "update_perp_market_max_spread",
      "discriminator": [
        80,
        252,
        122,
        62,
        40,
        218,
        91,
        100
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "max_spread",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_perp_market_min_order_size",
      "discriminator": [
        226,
        74,
        5,
        89,
        108,
        223,
        46,
        141
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "order_size",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_perp_market_name",
      "discriminator": [
        211,
        31,
        21,
        210,
        64,
        108,
        66,
        201
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "name",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        }
      ]
    },
    {
      "name": "update_perp_market_number_of_users",
      "discriminator": [
        35,
        62,
        144,
        177,
        180,
        62,
        215,
        196
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "number_of_users",
          "type": {
            "option": "u32"
          }
        },
        {
          "name": "number_of_users_with_base",
          "type": {
            "option": "u32"
          }
        }
      ]
    },
    {
      "name": "update_perp_market_oracle",
      "discriminator": [
        182,
        113,
        111,
        160,
        67,
        174,
        89,
        191
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "oracle"
        },
        {
          "name": "old_oracle"
        },
        {
          "name": "amm_cache",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  97,
                  109,
                  109,
                  95,
                  99,
                  97,
                  99,
                  104,
                  101,
                  95,
                  115,
                  101,
                  101,
                  100
                ]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "oracle",
          "type": "pubkey"
        },
        {
          "name": "oracle_source",
          "type": {
            "defined": {
              "name": "OracleSource"
            }
          }
        },
        {
          "name": "skip_invariant_check",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_perp_market_oracle_low_risk_slot_delay_override",
      "discriminator": [
        124,
        108,
        147,
        229,
        109,
        117,
        123,
        3
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "oracle_low_risk_slot_delay_override",
          "type": "i8"
        }
      ]
    },
    {
      "name": "update_perp_market_oracle_slot_delay_override",
      "discriminator": [
        165,
        91,
        239,
        227,
        63,
        172,
        227,
        8
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "oracle_slot_delay_override",
          "type": "i8"
        }
      ]
    },
    {
      "name": "update_perp_market_paused_operations",
      "discriminator": [
        53,
        16,
        136,
        132,
        30,
        220,
        121,
        85
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "paused_operations",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_perp_market_pnl_pool",
      "discriminator": [
        50,
        202,
        249,
        224,
        166,
        184,
        13,
        143
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_perp_market_protected_maker_params",
      "discriminator": [
        249,
        213,
        115,
        34,
        253,
        239,
        75,
        173
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "protected_maker_limit_price_divisor",
          "type": {
            "option": "u8"
          }
        },
        {
          "name": "protected_maker_dynamic_divisor",
          "type": {
            "option": "u8"
          }
        }
      ]
    },
    {
      "name": "update_perp_market_reference_price_offset_deadband_pct",
      "discriminator": [
        214,
        73,
        166,
        11,
        218,
        76,
        110,
        163
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "reference_price_offset_deadband_pct",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_perp_market_status",
      "discriminator": [
        71,
        201,
        175,
        122,
        255,
        207,
        196,
        207
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "status",
          "type": {
            "defined": {
              "name": "MarketStatus"
            }
          }
        }
      ]
    },
    {
      "name": "update_perp_market_step_size_and_tick_size",
      "discriminator": [
        231,
        255,
        97,
        25,
        146,
        139,
        174,
        4
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "step_size",
          "type": "u64"
        },
        {
          "name": "tick_size",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_perp_market_unrealized_asset_weight",
      "discriminator": [
        135,
        132,
        205,
        165,
        109,
        150,
        166,
        106
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "unrealized_initial_asset_weight",
          "type": "u32"
        },
        {
          "name": "unrealized_maintenance_asset_weight",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_prelaunch_oracle",
      "discriminator": [
        220,
        132,
        27,
        27,
        233,
        220,
        61,
        219
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "perp_market"
        },
        {
          "name": "oracle",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "update_prelaunch_oracle_params",
      "discriminator": [
        98,
        205,
        147,
        243,
        18,
        75,
        83,
        207
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "prelaunch_oracle",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  101,
                  108,
                  97,
                  117,
                  110,
                  99,
                  104,
                  95,
                  111,
                  114,
                  97,
                  99,
                  108,
                  101
                ]
              },
              {
                "kind": "arg",
                "path": "params.perp_market_index"
              }
            ]
          }
        },
        {
          "name": "perp_market",
          "writable": true
        },
        {
          "name": "state"
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "PrelaunchOracleParams"
            }
          }
        }
      ]
    },
    {
      "name": "update_protected_maker_mode_config",
      "discriminator": [
        86,
        166,
        235,
        253,
        67,
        202,
        223,
        17
      ],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "protected_maker_mode_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  101,
                  99,
                  116,
                  101,
                  100,
                  95,
                  109,
                  97,
                  107,
                  101,
                  114,
                  95,
                  109,
                  111,
                  100,
                  101,
                  95,
                  99,
                  111,
                  110,
                  102,
                  105,
                  103
                ]
              }
            ]
          }
        },
        {
          "name": "state"
        }
      ],
      "args": [
        {
          "name": "max_users",
          "type": "u32"
        },
        {
          "name": "reduce_only",
          "type": "bool"
        },
        {
          "name": "current_users",
          "type": {
            "option": "u32"
          }
        }
      ]
    },
    {
      "name": "update_serum_fulfillment_config_status",
      "discriminator": [
        171,
        109,
        240,
        251,
        95,
        1,
        149,
        89
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "serum_fulfillment_config",
          "writable": true
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        }
      ],
      "args": [
        {
          "name": "status",
          "type": {
            "defined": {
              "name": "SpotFulfillmentConfigStatus"
            }
          }
        }
      ]
    },
    {
      "name": "update_special_user_status",
      "discriminator": [
        23,
        237,
        166,
        194,
        38,
        7,
        41,
        45
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "status",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_spot_auction_duration",
      "discriminator": [
        182,
        178,
        203,
        72,
        187,
        143,
        157,
        107
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "default_spot_auction_duration",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_spot_fee_structure",
      "discriminator": [
        97,
        216,
        105,
        131,
        113,
        246,
        142,
        141
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "fee_structure",
          "type": {
            "defined": {
              "name": "FeeStructure"
            }
          }
        }
      ]
    },
    {
      "name": "update_spot_market_asset_tier",
      "discriminator": [
        253,
        209,
        231,
        14,
        242,
        208,
        243,
        130
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "asset_tier",
          "type": {
            "defined": {
              "name": "AssetTier"
            }
          }
        }
      ]
    },
    {
      "name": "update_spot_market_borrow_rate",
      "discriminator": [
        71,
        239,
        236,
        153,
        210,
        62,
        254,
        76
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "optimal_utilization",
          "type": "u32"
        },
        {
          "name": "optimal_borrow_rate",
          "type": "u32"
        },
        {
          "name": "max_borrow_rate",
          "type": "u32"
        },
        {
          "name": "min_borrow_rate",
          "type": {
            "option": "u8"
          }
        }
      ]
    },
    {
      "name": "update_spot_market_cumulative_interest",
      "discriminator": [
        39,
        166,
        139,
        243,
        158,
        165,
        155,
        225
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        },
        {
          "name": "oracle"
        },
        {
          "name": "spot_market_vault",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "spot_market"
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "update_spot_market_expiry",
      "discriminator": [
        208,
        11,
        211,
        159,
        226,
        24,
        11,
        247
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "expiry_ts",
          "type": "i64"
        }
      ]
    },
    {
      "name": "update_spot_market_fee_adjustment",
      "discriminator": [
        148,
        182,
        3,
        126,
        157,
        114,
        220,
        99
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "fee_adjustment",
          "type": "i16"
        }
      ]
    },
    {
      "name": "update_spot_market_if_factor",
      "discriminator": [
        147,
        30,
        224,
        34,
        18,
        230,
        105,
        4
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "spot_market_index",
          "type": "u16"
        },
        {
          "name": "user_if_factor",
          "type": "u32"
        },
        {
          "name": "total_if_factor",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_spot_market_if_paused_operations",
      "discriminator": [
        101,
        215,
        79,
        74,
        59,
        41,
        79,
        12
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "paused_operations",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_spot_market_liquidation_fee",
      "discriminator": [
        11,
        13,
        255,
        53,
        56,
        136,
        104,
        177
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "liquidator_fee",
          "type": "u32"
        },
        {
          "name": "if_liquidation_fee",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_spot_market_margin_weights",
      "discriminator": [
        109,
        33,
        87,
        195,
        255,
        36,
        6,
        81
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "initial_asset_weight",
          "type": "u32"
        },
        {
          "name": "maintenance_asset_weight",
          "type": "u32"
        },
        {
          "name": "initial_liability_weight",
          "type": "u32"
        },
        {
          "name": "maintenance_liability_weight",
          "type": "u32"
        },
        {
          "name": "imf_factor",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_spot_market_max_token_borrows",
      "discriminator": [
        57,
        102,
        204,
        212,
        253,
        95,
        13,
        199
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "max_token_borrows_fraction",
          "type": "u16"
        }
      ]
    },
    {
      "name": "update_spot_market_max_token_deposits",
      "discriminator": [
        56,
        191,
        79,
        18,
        26,
        121,
        80,
        208
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "max_token_deposits",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_spot_market_min_order_size",
      "discriminator": [
        93,
        128,
        11,
        119,
        26,
        20,
        181,
        50
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "order_size",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_spot_market_name",
      "discriminator": [
        17,
        208,
        1,
        1,
        162,
        211,
        188,
        224
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "name",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        }
      ]
    },
    {
      "name": "update_spot_market_oracle",
      "discriminator": [
        114,
        184,
        102,
        37,
        246,
        186,
        180,
        99
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        },
        {
          "name": "oracle"
        },
        {
          "name": "old_oracle"
        }
      ],
      "args": [
        {
          "name": "oracle",
          "type": "pubkey"
        },
        {
          "name": "oracle_source",
          "type": {
            "defined": {
              "name": "OracleSource"
            }
          }
        },
        {
          "name": "skip_invariant_check",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_spot_market_orders_enabled",
      "discriminator": [
        190,
        79,
        206,
        15,
        26,
        229,
        229,
        43
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "orders_enabled",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_spot_market_paused_operations",
      "discriminator": [
        100,
        61,
        153,
        81,
        180,
        12,
        6,
        248
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "paused_operations",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_spot_market_pool_id",
      "discriminator": [
        22,
        213,
        197,
        160,
        139,
        193,
        81,
        149
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "pool_id",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_spot_market_revenue_settle_period",
      "discriminator": [
        81,
        92,
        126,
        41,
        250,
        225,
        156,
        219
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "revenue_settle_period",
          "type": "i64"
        }
      ]
    },
    {
      "name": "update_spot_market_scale_initial_asset_weight_start",
      "discriminator": [
        217,
        204,
        204,
        118,
        204,
        130,
        225,
        147
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "scale_initial_asset_weight_start",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_spot_market_status",
      "discriminator": [
        78,
        94,
        16,
        188,
        193,
        110,
        231,
        31
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "status",
          "type": {
            "defined": {
              "name": "MarketStatus"
            }
          }
        }
      ]
    },
    {
      "name": "update_spot_market_step_size_and_tick_size",
      "discriminator": [
        238,
        153,
        137,
        80,
        206,
        59,
        250,
        61
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "step_size",
          "type": "u64"
        },
        {
          "name": "tick_size",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_state_max_initialize_user_fee",
      "discriminator": [
        237,
        225,
        25,
        237,
        193,
        45,
        77,
        97
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "max_initialize_user_fee",
          "type": "u16"
        }
      ]
    },
    {
      "name": "update_state_max_number_of_sub_accounts",
      "discriminator": [
        155,
        123,
        214,
        2,
        221,
        166,
        204,
        85
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "max_number_of_sub_accounts",
          "type": "u16"
        }
      ]
    },
    {
      "name": "update_state_settlement_duration",
      "discriminator": [
        97,
        68,
        199,
        235,
        131,
        80,
        61,
        173
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "settlement_duration",
          "type": "u16"
        }
      ]
    },
    {
      "name": "update_user_custom_margin_ratio",
      "discriminator": [
        21,
        221,
        140,
        187,
        32,
        129,
        11,
        123
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  117,
                  115,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              },
              {
                "kind": "arg",
                "path": "sub_account_id"
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "_sub_account_id",
          "type": "u16"
        },
        {
          "name": "margin_ratio",
          "type": "u32"
        }
      ]
    },
    {
      "name": "update_user_delegate",
      "discriminator": [
        139,
        205,
        141,
        141,
        113,
        36,
        94,
        187
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  117,
                  115,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              },
              {
                "kind": "arg",
                "path": "sub_account_id"
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "_sub_account_id",
          "type": "u16"
        },
        {
          "name": "delegate",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "update_user_gov_token_insurance_stake",
      "discriminator": [
        143,
        99,
        235,
        187,
        20,
        159,
        184,
        84
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  15,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "insurance_fund_stake",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  15,
                  0
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "update_user_idle",
      "discriminator": [
        253,
        133,
        67,
        22,
        103,
        161,
        20,
        100
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "filler",
          "writable": true
        },
        {
          "name": "user",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "update_user_margin_trading_enabled",
      "discriminator": [
        194,
        92,
        204,
        223,
        246,
        188,
        31,
        203
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  117,
                  115,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              },
              {
                "kind": "arg",
                "path": "sub_account_id"
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "_sub_account_id",
          "type": "u16"
        },
        {
          "name": "margin_trading_enabled",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_user_name",
      "discriminator": [
        135,
        25,
        185,
        56,
        165,
        53,
        34,
        136
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  117,
                  115,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              },
              {
                "kind": "arg",
                "path": "sub_account_id"
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "_sub_account_id",
          "type": "u16"
        },
        {
          "name": "name",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        }
      ]
    },
    {
      "name": "update_user_perp_position_custom_margin_ratio",
      "discriminator": [
        121,
        137,
        157,
        155,
        89,
        186,
        145,
        113
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "_sub_account_id",
          "type": "u16"
        },
        {
          "name": "perp_market_index",
          "type": "u16"
        },
        {
          "name": "margin_ratio",
          "type": "u16"
        }
      ]
    },
    {
      "name": "update_user_pool_id",
      "discriminator": [
        219,
        86,
        73,
        106,
        56,
        218,
        128,
        109
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  117,
                  115,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              },
              {
                "kind": "arg",
                "path": "sub_account_id"
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "_sub_account_id",
          "type": "u16"
        },
        {
          "name": "pool_id",
          "type": "u8"
        }
      ]
    },
    {
      "name": "update_user_protected_maker_orders",
      "discriminator": [
        114,
        39,
        123,
        198,
        187,
        25,
        90,
        219
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "protected_maker_mode_config",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "_sub_account_id",
          "type": "u16"
        },
        {
          "name": "protected_maker_orders",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_user_quote_asset_insurance_stake",
      "discriminator": [
        251,
        101,
        156,
        7,
        2,
        63,
        30,
        23
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        },
        {
          "name": "insurance_fund_stake",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "insurance_fund_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  105,
                  110,
                  115,
                  117,
                  114,
                  97,
                  110,
                  99,
                  101,
                  95,
                  102,
                  117,
                  110,
                  100,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "const",
                "value": [
                  0,
                  0
                ]
              }
            ]
          }
        }
      ],
      "args": []
    },
    {
      "name": "update_user_reduce_only",
      "discriminator": [
        199,
        71,
        42,
        67,
        144,
        19,
        86,
        109
      ],
      "accounts": [
        {
          "name": "user",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  117,
                  115,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "authority"
              },
              {
                "kind": "arg",
                "path": "sub_account_id"
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "_sub_account_id",
          "type": "u16"
        },
        {
          "name": "reduce_only",
          "type": "bool"
        }
      ]
    },
    {
      "name": "update_user_stats_referrer_status",
      "discriminator": [
        174,
        154,
        72,
        42,
        191,
        148,
        145,
        205
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "user_stats",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "update_withdraw_guard_threshold",
      "discriminator": [
        56,
        18,
        39,
        61,
        155,
        211,
        44,
        133
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": [
            "state"
          ]
        },
        {
          "name": "state"
        },
        {
          "name": "spot_market",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "withdraw_guard_threshold",
          "type": "u64"
        }
      ]
    },
    {
      "name": "view_lp_pool_add_liquidity_fees",
      "discriminator": [
        80,
        66,
        226,
        161,
        70,
        142,
        119,
        84
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "lp_pool"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "in_market_mint"
        },
        {
          "name": "in_constituent",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "lp_mint"
        },
        {
          "name": "constituent_target_base"
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "in_amount",
          "type": "u128"
        }
      ]
    },
    {
      "name": "view_lp_pool_remove_liquidity_fees",
      "discriminator": [
        47,
        12,
        9,
        102,
        12,
        226,
        197,
        89
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "lp_pool"
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "out_market_mint"
        },
        {
          "name": "out_constituent",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "lp_mint"
        },
        {
          "name": "constituent_target_base"
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "in_amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "view_lp_pool_swap_fees",
      "discriminator": [
        126,
        189,
        109,
        189,
        170,
        156,
        3,
        46
      ],
      "accounts": [
        {
          "name": "drift_signer"
        },
        {
          "name": "state"
        },
        {
          "name": "lp_pool"
        },
        {
          "name": "constituent_target_base"
        },
        {
          "name": "constituent_correlations"
        },
        {
          "name": "constituent_in_token_account",
          "writable": true
        },
        {
          "name": "constituent_out_token_account",
          "writable": true
        },
        {
          "name": "in_constituent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "in_market_index"
              }
            ]
          }
        },
        {
          "name": "out_constituent",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  67,
                  79,
                  78,
                  83,
                  84,
                  73,
                  84,
                  85,
                  69,
                  78,
                  84
                ]
              },
              {
                "kind": "account",
                "path": "lp_pool"
              },
              {
                "kind": "arg",
                "path": "out_market_index"
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "in_market_index",
          "type": "u16"
        },
        {
          "name": "out_market_index",
          "type": "u16"
        },
        {
          "name": "in_amount",
          "type": "u64"
        },
        {
          "name": "in_target_weight",
          "type": "i64"
        },
        {
          "name": "out_target_weight",
          "type": "i64"
        }
      ]
    },
    {
      "name": "withdraw",
      "discriminator": [
        183,
        18,
        70,
        156,
        148,
        109,
        161,
        34
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "user",
            "user_stats"
          ]
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "market_index"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "user_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "reduce_only",
          "type": "bool"
        }
      ]
    },
    {
      "name": "withdraw_from_isolated_perp_position",
      "discriminator": [
        37,
        92,
        178,
        149,
        140,
        76,
        159,
        135
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "user",
          "writable": true
        },
        {
          "name": "user_stats",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "user",
            "user_stats"
          ]
        },
        {
          "name": "spot_market_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115,
                  112,
                  111,
                  116,
                  95,
                  109,
                  97,
                  114,
                  107,
                  101,
                  116,
                  95,
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "arg",
                "path": "spot_market_index"
              }
            ]
          }
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "user_token_account",
          "writable": true
        },
        {
          "name": "token_program"
        }
      ],
      "args": [
        {
          "name": "spot_market_index",
          "type": "u16"
        },
        {
          "name": "perp_market_index",
          "type": "u16"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "withdraw_from_program_vault",
      "discriminator": [
        120,
        40,
        183,
        149,
        232,
        18,
        224,
        151
      ],
      "accounts": [
        {
          "name": "state"
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "drift_signer"
        },
        {
          "name": "constituent",
          "writable": true
        },
        {
          "name": "constituent_token_account",
          "writable": true
        },
        {
          "name": "spot_market",
          "writable": true
        },
        {
          "name": "spot_market_vault",
          "writable": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "mint"
        },
        {
          "name": "oracle"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "zero_mm_oracle_fields",
      "discriminator": [
        192,
        226,
        39,
        204,
        207,
        120,
        148,
        250
      ],
      "accounts": [
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "state"
        },
        {
          "name": "perp_market",
          "writable": true
        }
      ],
      "args": []
    }
  ],
  "accounts": [
    {
      "name": "AmmCache",
      "discriminator": [
        213,
        114,
        161,
        56,
        20,
        22,
        2,
        59
      ]
    },
    {
      "name": "AmmConstituentMapping",
      "discriminator": [
        254,
        89,
        5,
        173,
        66,
        54,
        214,
        247
      ]
    },
    {
      "name": "Constituent",
      "discriminator": [
        0,
        61,
        36,
        35,
        177,
        76,
        216,
        205
      ]
    },
    {
      "name": "ConstituentCorrelations",
      "discriminator": [
        124,
        203,
        115,
        33,
        18,
        162,
        67,
        216
      ]
    },
    {
      "name": "ConstituentTargetBase",
      "discriminator": [
        255,
        142,
        134,
        71,
        125,
        66,
        198,
        99
      ]
    },
    {
      "name": "FuelOverflow",
      "discriminator": [
        182,
        64,
        231,
        177,
        226,
        142,
        69,
        58
      ]
    },
    {
      "name": "IfRebalanceConfig",
      "discriminator": [
        214,
        84,
        40,
        251,
        107,
        144,
        173,
        239
      ]
    },
    {
      "name": "InsuranceFundStake",
      "discriminator": [
        110,
        202,
        14,
        42,
        95,
        73,
        90,
        95
      ]
    },
    {
      "name": "LPPool",
      "discriminator": [
        228,
        152,
        141,
        224,
        161,
        170,
        11,
        89
      ]
    },
    {
      "name": "OpenbookV2FulfillmentConfig",
      "discriminator": [
        3,
        43,
        58,
        106,
        131,
        132,
        199,
        171
      ]
    },
    {
      "name": "PerpMarket",
      "discriminator": [
        10,
        223,
        12,
        44,
        107,
        245,
        55,
        247
      ]
    },
    {
      "name": "PhoenixV1FulfillmentConfig",
      "discriminator": [
        233,
        45,
        62,
        40,
        35,
        129,
        48,
        72
      ]
    },
    {
      "name": "PrelaunchOracle",
      "discriminator": [
        92,
        14,
        139,
        234,
        72,
        244,
        68,
        26
      ]
    },
    {
      "name": "ProtectedMakerModeConfig",
      "discriminator": [
        47,
        86,
        90,
        9,
        224,
        255,
        10,
        69
      ]
    },
    {
      "name": "PythLazerOracle",
      "discriminator": [
        159,
        7,
        161,
        249,
        34,
        81,
        121,
        133
      ]
    },
    {
      "name": "ReferrerName",
      "discriminator": [
        105,
        133,
        170,
        110,
        52,
        42,
        28,
        182
      ]
    },
    {
      "name": "RevenueShare",
      "discriminator": [
        55,
        40,
        228,
        7,
        139,
        52,
        180,
        110
      ]
    },
    {
      "name": "RevenueShareEscrow",
      "discriminator": [
        98,
        167,
        3,
        46,
        74,
        177,
        173,
        252
      ]
    },
    {
      "name": "SerumV3FulfillmentConfig",
      "discriminator": [
        65,
        160,
        197,
        112,
        239,
        168,
        103,
        185
      ]
    },
    {
      "name": "SignedMsgUserOrders",
      "discriminator": [
        70,
        6,
        50,
        248,
        222,
        1,
        143,
        49
      ]
    },
    {
      "name": "SignedMsgWsDelegates",
      "discriminator": [
        190,
        115,
        111,
        44,
        216,
        252,
        108,
        85
      ]
    },
    {
      "name": "SpotMarket",
      "discriminator": [
        100,
        177,
        8,
        107,
        168,
        65,
        65,
        39
      ]
    },
    {
      "name": "State",
      "discriminator": [
        216,
        146,
        107,
        94,
        104,
        75,
        182,
        177
      ]
    },
    {
      "name": "User",
      "discriminator": [
        159,
        117,
        95,
        227,
        239,
        151,
        58,
        236
      ]
    },
    {
      "name": "UserStats",
      "discriminator": [
        176,
        223,
        136,
        27,
        122,
        79,
        32,
        227
      ]
    }
  ],
  "events": [
    {
      "name": "AdminWithdrawFromInsuranceFundRecord",
      "discriminator": [
        230,
        236,
        10,
        0,
        196,
        41,
        147,
        45
      ]
    },
    {
      "name": "CurveRecord",
      "discriminator": [
        101,
        238,
        40,
        228,
        70,
        46,
        61,
        117
      ]
    },
    {
      "name": "DeleteUserRecord",
      "discriminator": [
        71,
        111,
        190,
        118,
        7,
        3,
        132,
        222
      ]
    },
    {
      "name": "DepositRecord",
      "discriminator": [
        180,
        241,
        218,
        207,
        102,
        135,
        44,
        134
      ]
    },
    {
      "name": "FuelSeasonRecord",
      "discriminator": [
        19,
        137,
        119,
        33,
        224,
        249,
        6,
        87
      ]
    },
    {
      "name": "FuelSweepRecord",
      "discriminator": [
        41,
        84,
        37,
        246,
        132,
        240,
        131,
        8
      ]
    },
    {
      "name": "FundingPaymentRecord",
      "discriminator": [
        8,
        59,
        96,
        20,
        137,
        201,
        56,
        95
      ]
    },
    {
      "name": "FundingRateRecord",
      "discriminator": [
        68,
        3,
        255,
        26,
        133,
        91,
        147,
        254
      ]
    },
    {
      "name": "InsuranceFundRecord",
      "discriminator": [
        56,
        222,
        215,
        235,
        78,
        197,
        99,
        146
      ]
    },
    {
      "name": "InsuranceFundStakeRecord",
      "discriminator": [
        68,
        66,
        156,
        7,
        216,
        148,
        250,
        114
      ]
    },
    {
      "name": "InsuranceFundSwapRecord",
      "discriminator": [
        85,
        190,
        99,
        203,
        237,
        33,
        227,
        100
      ]
    },
    {
      "name": "LPBorrowLendDepositRecord",
      "discriminator": [
        242,
        181,
        11,
        56,
        243,
        61,
        79,
        210
      ]
    },
    {
      "name": "LPMintRedeemRecord",
      "discriminator": [
        53,
        178,
        142,
        73,
        78,
        91,
        91,
        8
      ]
    },
    {
      "name": "LPRecord",
      "discriminator": [
        101,
        22,
        54,
        38,
        178,
        13,
        142,
        111
      ]
    },
    {
      "name": "LPSettleRecord",
      "discriminator": [
        208,
        191,
        131,
        110,
        173,
        48,
        7,
        2
      ]
    },
    {
      "name": "LPSwapRecord",
      "discriminator": [
        159,
        62,
        130,
        196,
        96,
        79,
        176,
        254
      ]
    },
    {
      "name": "LiquidationRecord",
      "discriminator": [
        127,
        17,
        0,
        108,
        182,
        13,
        231,
        53
      ]
    },
    {
      "name": "NewUserRecord",
      "discriminator": [
        236,
        186,
        113,
        219,
        42,
        51,
        149,
        249
      ]
    },
    {
      "name": "OrderActionRecord",
      "discriminator": [
        224,
        52,
        67,
        71,
        194,
        237,
        109,
        1
      ]
    },
    {
      "name": "OrderRecord",
      "discriminator": [
        104,
        19,
        64,
        56,
        89,
        21,
        2,
        90
      ]
    },
    {
      "name": "RevenueShareSettleRecord",
      "discriminator": [
        61,
        162,
        89,
        10,
        24,
        20,
        59,
        45
      ]
    },
    {
      "name": "SettlePnlRecord",
      "discriminator": [
        57,
        68,
        105,
        26,
        119,
        198,
        213,
        89
      ]
    },
    {
      "name": "SignedMsgOrderRecord",
      "discriminator": [
        211,
        197,
        25,
        18,
        142,
        86,
        113,
        27
      ]
    },
    {
      "name": "SpotInterestRecord",
      "discriminator": [
        183,
        186,
        203,
        186,
        225,
        187,
        95,
        130
      ]
    },
    {
      "name": "SpotMarketVaultDepositRecord",
      "discriminator": [
        178,
        217,
        23,
        188,
        127,
        190,
        32,
        73
      ]
    },
    {
      "name": "SwapRecord",
      "discriminator": [
        162,
        187,
        123,
        194,
        138,
        56,
        250,
        241
      ]
    },
    {
      "name": "TransferFeeAndPnlPoolRecord",
      "discriminator": [
        92,
        57,
        45,
        144,
        26,
        86,
        247,
        12
      ]
    },
    {
      "name": "TransferProtocolIfSharesToRevenuePoolRecord",
      "discriminator": [
        209,
        118,
        142,
        167,
        130,
        46,
        164,
        151
      ]
    },
    {
      "name": "_SignedMsgOrderParamsExport",
      "discriminator": [
        141,
        81,
        104,
        63,
        186,
        109,
        87,
        251
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "InvalidSpotMarketAuthority",
      "msg": "Invalid Spot Market Authority"
    },
    {
      "code": 6001,
      "name": "InvalidInsuranceFundAuthority",
      "msg": "Clearing house not insurance fund authority"
    },
    {
      "code": 6002,
      "name": "InsufficientDeposit",
      "msg": "Insufficient deposit"
    },
    {
      "code": 6003,
      "name": "InsufficientCollateral",
      "msg": "Insufficient collateral"
    },
    {
      "code": 6004,
      "name": "SufficientCollateral",
      "msg": "Sufficient collateral"
    },
    {
      "code": 6005,
      "name": "MaxNumberOfPositions",
      "msg": "Max number of positions taken"
    },
    {
      "code": 6006,
      "name": "AdminControlsPricesDisabled",
      "msg": "Admin Controls Prices Disabled"
    },
    {
      "code": 6007,
      "name": "MarketDelisted",
      "msg": "Market Delisted"
    },
    {
      "code": 6008,
      "name": "MarketIndexAlreadyInitialized",
      "msg": "Market Index Already Initialized"
    },
    {
      "code": 6009,
      "name": "UserAccountAndUserPositionsAccountMismatch",
      "msg": "User Account And User Positions Account Mismatch"
    },
    {
      "code": 6010,
      "name": "UserHasNoPositionInMarket",
      "msg": "User Has No Position In Market"
    },
    {
      "code": 6011,
      "name": "InvalidInitialPeg",
      "msg": "Invalid Initial Peg"
    },
    {
      "code": 6012,
      "name": "InvalidRepegRedundant",
      "msg": "AMM repeg already configured with amt given"
    },
    {
      "code": 6013,
      "name": "InvalidRepegDirection",
      "msg": "AMM repeg incorrect repeg direction"
    },
    {
      "code": 6014,
      "name": "InvalidRepegProfitability",
      "msg": "AMM repeg out of bounds pnl"
    },
    {
      "code": 6015,
      "name": "SlippageOutsideLimit",
      "msg": "Slippage Outside Limit Price"
    },
    {
      "code": 6016,
      "name": "OrderSizeTooSmall",
      "msg": "Order Size Too Small"
    },
    {
      "code": 6017,
      "name": "InvalidUpdateK",
      "msg": "Price change too large when updating K"
    },
    {
      "code": 6018,
      "name": "AdminWithdrawTooLarge",
      "msg": "Admin tried to withdraw amount larger than fees collected"
    },
    {
      "code": 6019,
      "name": "MathError",
      "msg": "Math Error"
    },
    {
      "code": 6020,
      "name": "BnConversionError",
      "msg": "Conversion to u128/u64 failed with an overflow or underflow"
    },
    {
      "code": 6021,
      "name": "ClockUnavailable",
      "msg": "Clock unavailable"
    },
    {
      "code": 6022,
      "name": "UnableToLoadOracle",
      "msg": "Unable To Load Oracles"
    },
    {
      "code": 6023,
      "name": "PriceBandsBreached",
      "msg": "Price Bands Breached"
    },
    {
      "code": 6024,
      "name": "ExchangePaused",
      "msg": "Exchange is paused"
    },
    {
      "code": 6025,
      "name": "InvalidWhitelistToken",
      "msg": "Invalid whitelist token"
    },
    {
      "code": 6026,
      "name": "WhitelistTokenNotFound",
      "msg": "Whitelist token not found"
    },
    {
      "code": 6027,
      "name": "InvalidDiscountToken",
      "msg": "Invalid discount token"
    },
    {
      "code": 6028,
      "name": "DiscountTokenNotFound",
      "msg": "Discount token not found"
    },
    {
      "code": 6029,
      "name": "ReferrerNotFound",
      "msg": "Referrer not found"
    },
    {
      "code": 6030,
      "name": "ReferrerStatsNotFound",
      "msg": "ReferrerNotFound"
    },
    {
      "code": 6031,
      "name": "ReferrerMustBeWritable",
      "msg": "ReferrerMustBeWritable"
    },
    {
      "code": 6032,
      "name": "ReferrerStatsMustBeWritable",
      "msg": "ReferrerMustBeWritable"
    },
    {
      "code": 6033,
      "name": "ReferrerAndReferrerStatsAuthorityUnequal",
      "msg": "ReferrerAndReferrerStatsAuthorityUnequal"
    },
    {
      "code": 6034,
      "name": "InvalidReferrer",
      "msg": "InvalidReferrer"
    },
    {
      "code": 6035,
      "name": "InvalidOracle",
      "msg": "InvalidOracle"
    },
    {
      "code": 6036,
      "name": "OracleNotFound",
      "msg": "OracleNotFound"
    },
    {
      "code": 6037,
      "name": "LiquidationsBlockedByOracle",
      "msg": "Liquidations Blocked By Oracle"
    },
    {
      "code": 6038,
      "name": "MaxDeposit",
      "msg": "Can not deposit more than max deposit"
    },
    {
      "code": 6039,
      "name": "CantDeleteUserWithCollateral",
      "msg": "Can not delete user that still has collateral"
    },
    {
      "code": 6040,
      "name": "InvalidFundingProfitability",
      "msg": "AMM funding out of bounds pnl"
    },
    {
      "code": 6041,
      "name": "CastingFailure",
      "msg": "Casting Failure"
    },
    {
      "code": 6042,
      "name": "InvalidOrder",
      "msg": "InvalidOrder"
    },
    {
      "code": 6043,
      "name": "InvalidOrderMaxTs",
      "msg": "InvalidOrderMaxTs"
    },
    {
      "code": 6044,
      "name": "InvalidOrderMarketType",
      "msg": "InvalidOrderMarketType"
    },
    {
      "code": 6045,
      "name": "InvalidOrderForInitialMarginReq",
      "msg": "InvalidOrderForInitialMarginReq"
    },
    {
      "code": 6046,
      "name": "InvalidOrderNotRiskReducing",
      "msg": "InvalidOrderNotRiskReducing"
    },
    {
      "code": 6047,
      "name": "InvalidOrderSizeTooSmall",
      "msg": "InvalidOrderSizeTooSmall"
    },
    {
      "code": 6048,
      "name": "InvalidOrderNotStepSizeMultiple",
      "msg": "InvalidOrderNotStepSizeMultiple"
    },
    {
      "code": 6049,
      "name": "InvalidOrderBaseQuoteAsset",
      "msg": "InvalidOrderBaseQuoteAsset"
    },
    {
      "code": 6050,
      "name": "InvalidOrderIOC",
      "msg": "InvalidOrderIOC"
    },
    {
      "code": 6051,
      "name": "InvalidOrderPostOnly",
      "msg": "InvalidOrderPostOnly"
    },
    {
      "code": 6052,
      "name": "InvalidOrderIOCPostOnly",
      "msg": "InvalidOrderIOCPostOnly"
    },
    {
      "code": 6053,
      "name": "InvalidOrderTrigger",
      "msg": "InvalidOrderTrigger"
    },
    {
      "code": 6054,
      "name": "InvalidOrderAuction",
      "msg": "InvalidOrderAuction"
    },
    {
      "code": 6055,
      "name": "InvalidOrderOracleOffset",
      "msg": "InvalidOrderOracleOffset"
    },
    {
      "code": 6056,
      "name": "InvalidOrderMinOrderSize",
      "msg": "InvalidOrderMinOrderSize"
    },
    {
      "code": 6057,
      "name": "PlacePostOnlyLimitFailure",
      "msg": "Failed to Place Post-Only Limit Order"
    },
    {
      "code": 6058,
      "name": "UserHasNoOrder",
      "msg": "User has no order"
    },
    {
      "code": 6059,
      "name": "OrderAmountTooSmall",
      "msg": "Order Amount Too Small"
    },
    {
      "code": 6060,
      "name": "MaxNumberOfOrders",
      "msg": "Max number of orders taken"
    },
    {
      "code": 6061,
      "name": "OrderDoesNotExist",
      "msg": "Order does not exist"
    },
    {
      "code": 6062,
      "name": "OrderNotOpen",
      "msg": "Order not open"
    },
    {
      "code": 6063,
      "name": "FillOrderDidNotUpdateState",
      "msg": "FillOrderDidNotUpdateState"
    },
    {
      "code": 6064,
      "name": "ReduceOnlyOrderIncreasedRisk",
      "msg": "Reduce only order increased risk"
    },
    {
      "code": 6065,
      "name": "UnableToLoadAccountLoader",
      "msg": "Unable to load AccountLoader"
    },
    {
      "code": 6066,
      "name": "TradeSizeTooLarge",
      "msg": "Trade Size Too Large"
    },
    {
      "code": 6067,
      "name": "UserCantReferThemselves",
      "msg": "User cant refer themselves"
    },
    {
      "code": 6068,
      "name": "DidNotReceiveExpectedReferrer",
      "msg": "Did not receive expected referrer"
    },
    {
      "code": 6069,
      "name": "CouldNotDeserializeReferrer",
      "msg": "Could not deserialize referrer"
    },
    {
      "code": 6070,
      "name": "CouldNotDeserializeReferrerStats",
      "msg": "Could not deserialize referrer stats"
    },
    {
      "code": 6071,
      "name": "UserOrderIdAlreadyInUse",
      "msg": "User Order Id Already In Use"
    },
    {
      "code": 6072,
      "name": "NoPositionsLiquidatable",
      "msg": "No positions liquidatable"
    },
    {
      "code": 6073,
      "name": "InvalidMarginRatio",
      "msg": "Invalid Margin Ratio"
    },
    {
      "code": 6074,
      "name": "CantCancelPostOnlyOrder",
      "msg": "Cant Cancel Post Only Order"
    },
    {
      "code": 6075,
      "name": "InvalidOracleOffset",
      "msg": "InvalidOracleOffset"
    },
    {
      "code": 6076,
      "name": "CantExpireOrders",
      "msg": "CantExpireOrders"
    },
    {
      "code": 6077,
      "name": "CouldNotLoadMarketData",
      "msg": "CouldNotLoadMarketData"
    },
    {
      "code": 6078,
      "name": "PerpMarketNotFound",
      "msg": "PerpMarketNotFound"
    },
    {
      "code": 6079,
      "name": "InvalidMarketAccount",
      "msg": "InvalidMarketAccount"
    },
    {
      "code": 6080,
      "name": "UnableToLoadPerpMarketAccount",
      "msg": "UnableToLoadMarketAccount"
    },
    {
      "code": 6081,
      "name": "MarketWrongMutability",
      "msg": "MarketWrongMutability"
    },
    {
      "code": 6082,
      "name": "UnableToCastUnixTime",
      "msg": "UnableToCastUnixTime"
    },
    {
      "code": 6083,
      "name": "CouldNotFindSpotPosition",
      "msg": "CouldNotFindSpotPosition"
    },
    {
      "code": 6084,
      "name": "NoSpotPositionAvailable",
      "msg": "NoSpotPositionAvailable"
    },
    {
      "code": 6085,
      "name": "InvalidSpotMarketInitialization",
      "msg": "InvalidSpotMarketInitialization"
    },
    {
      "code": 6086,
      "name": "CouldNotLoadSpotMarketData",
      "msg": "CouldNotLoadSpotMarketData"
    },
    {
      "code": 6087,
      "name": "SpotMarketNotFound",
      "msg": "SpotMarketNotFound"
    },
    {
      "code": 6088,
      "name": "InvalidSpotMarketAccount",
      "msg": "InvalidSpotMarketAccount"
    },
    {
      "code": 6089,
      "name": "UnableToLoadSpotMarketAccount",
      "msg": "UnableToLoadSpotMarketAccount"
    },
    {
      "code": 6090,
      "name": "SpotMarketWrongMutability",
      "msg": "SpotMarketWrongMutability"
    },
    {
      "code": 6091,
      "name": "SpotMarketInterestNotUpToDate",
      "msg": "SpotInterestNotUpToDate"
    },
    {
      "code": 6092,
      "name": "SpotMarketInsufficientDeposits",
      "msg": "SpotMarketInsufficientDeposits"
    },
    {
      "code": 6093,
      "name": "UserMustSettleTheirOwnPositiveUnsettledPNL",
      "msg": "UserMustSettleTheirOwnPositiveUnsettledPNL"
    },
    {
      "code": 6094,
      "name": "CantUpdateSpotBalanceType",
      "msg": "CantUpdateSpotBalanceType"
    },
    {
      "code": 6095,
      "name": "InsufficientCollateralForSettlingPNL",
      "msg": "InsufficientCollateralForSettlingPNL"
    },
    {
      "code": 6096,
      "name": "AMMNotUpdatedInSameSlot",
      "msg": "AMMNotUpdatedInSameSlot"
    },
    {
      "code": 6097,
      "name": "AuctionNotComplete",
      "msg": "AuctionNotComplete"
    },
    {
      "code": 6098,
      "name": "MakerNotFound",
      "msg": "MakerNotFound"
    },
    {
      "code": 6099,
      "name": "MakerStatsNotFound",
      "msg": "MakerNotFound"
    },
    {
      "code": 6100,
      "name": "MakerMustBeWritable",
      "msg": "MakerMustBeWritable"
    },
    {
      "code": 6101,
      "name": "MakerStatsMustBeWritable",
      "msg": "MakerMustBeWritable"
    },
    {
      "code": 6102,
      "name": "MakerOrderNotFound",
      "msg": "MakerOrderNotFound"
    },
    {
      "code": 6103,
      "name": "CouldNotDeserializeMaker",
      "msg": "CouldNotDeserializeMaker"
    },
    {
      "code": 6104,
      "name": "CouldNotDeserializeMakerStats",
      "msg": "CouldNotDeserializeMaker"
    },
    {
      "code": 6105,
      "name": "AuctionPriceDoesNotSatisfyMaker",
      "msg": "AuctionPriceDoesNotSatisfyMaker"
    },
    {
      "code": 6106,
      "name": "MakerCantFulfillOwnOrder",
      "msg": "MakerCantFulfillOwnOrder"
    },
    {
      "code": 6107,
      "name": "MakerOrderMustBePostOnly",
      "msg": "MakerOrderMustBePostOnly"
    },
    {
      "code": 6108,
      "name": "CantMatchTwoPostOnlys",
      "msg": "CantMatchTwoPostOnlys"
    },
    {
      "code": 6109,
      "name": "OrderBreachesOraclePriceLimits",
      "msg": "OrderBreachesOraclePriceLimits"
    },
    {
      "code": 6110,
      "name": "OrderMustBeTriggeredFirst",
      "msg": "OrderMustBeTriggeredFirst"
    },
    {
      "code": 6111,
      "name": "OrderNotTriggerable",
      "msg": "OrderNotTriggerable"
    },
    {
      "code": 6112,
      "name": "OrderDidNotSatisfyTriggerCondition",
      "msg": "OrderDidNotSatisfyTriggerCondition"
    },
    {
      "code": 6113,
      "name": "PositionAlreadyBeingLiquidated",
      "msg": "PositionAlreadyBeingLiquidated"
    },
    {
      "code": 6114,
      "name": "PositionDoesntHaveOpenPositionOrOrders",
      "msg": "PositionDoesntHaveOpenPositionOrOrders"
    },
    {
      "code": 6115,
      "name": "AllOrdersAreAlreadyLiquidations",
      "msg": "AllOrdersAreAlreadyLiquidations"
    },
    {
      "code": 6116,
      "name": "CantCancelLiquidationOrder",
      "msg": "CantCancelLiquidationOrder"
    },
    {
      "code": 6117,
      "name": "UserIsBeingLiquidated",
      "msg": "UserIsBeingLiquidated"
    },
    {
      "code": 6118,
      "name": "LiquidationsOngoing",
      "msg": "LiquidationsOngoing"
    },
    {
      "code": 6119,
      "name": "WrongSpotBalanceType",
      "msg": "WrongSpotBalanceType"
    },
    {
      "code": 6120,
      "name": "UserCantLiquidateThemself",
      "msg": "UserCantLiquidateThemself"
    },
    {
      "code": 6121,
      "name": "InvalidPerpPositionToLiquidate",
      "msg": "InvalidPerpPositionToLiquidate"
    },
    {
      "code": 6122,
      "name": "InvalidBaseAssetAmountForLiquidatePerp",
      "msg": "InvalidBaseAssetAmountForLiquidatePerp"
    },
    {
      "code": 6123,
      "name": "InvalidPositionLastFundingRate",
      "msg": "InvalidPositionLastFundingRate"
    },
    {
      "code": 6124,
      "name": "InvalidPositionDelta",
      "msg": "InvalidPositionDelta"
    },
    {
      "code": 6125,
      "name": "UserBankrupt",
      "msg": "UserBankrupt"
    },
    {
      "code": 6126,
      "name": "UserNotBankrupt",
      "msg": "UserNotBankrupt"
    },
    {
      "code": 6127,
      "name": "UserHasInvalidBorrow",
      "msg": "UserHasInvalidBorrow"
    },
    {
      "code": 6128,
      "name": "DailyWithdrawLimit",
      "msg": "DailyWithdrawLimit"
    },
    {
      "code": 6129,
      "name": "DefaultError",
      "msg": "DefaultError"
    },
    {
      "code": 6130,
      "name": "InsufficientLPTokens",
      "msg": "Insufficient LP tokens"
    },
    {
      "code": 6131,
      "name": "CantLPWithPerpPosition",
      "msg": "Cant LP with a market position"
    },
    {
      "code": 6132,
      "name": "UnableToBurnLPTokens",
      "msg": "Unable to burn LP tokens"
    },
    {
      "code": 6133,
      "name": "TryingToRemoveLiquidityTooFast",
      "msg": "Trying to remove liqudity too fast after adding it"
    },
    {
      "code": 6134,
      "name": "InvalidSpotMarketVault",
      "msg": "Invalid Spot Market Vault"
    },
    {
      "code": 6135,
      "name": "InvalidSpotMarketState",
      "msg": "Invalid Spot Market State"
    },
    {
      "code": 6136,
      "name": "InvalidSerumProgram",
      "msg": "InvalidSerumProgram"
    },
    {
      "code": 6137,
      "name": "InvalidSerumMarket",
      "msg": "InvalidSerumMarket"
    },
    {
      "code": 6138,
      "name": "InvalidSerumBids",
      "msg": "InvalidSerumBids"
    },
    {
      "code": 6139,
      "name": "InvalidSerumAsks",
      "msg": "InvalidSerumAsks"
    },
    {
      "code": 6140,
      "name": "InvalidSerumOpenOrders",
      "msg": "InvalidSerumOpenOrders"
    },
    {
      "code": 6141,
      "name": "FailedSerumCPI",
      "msg": "FailedSerumCPI"
    },
    {
      "code": 6142,
      "name": "FailedToFillOnExternalMarket",
      "msg": "FailedToFillOnExternalMarket"
    },
    {
      "code": 6143,
      "name": "InvalidFulfillmentConfig",
      "msg": "InvalidFulfillmentConfig"
    },
    {
      "code": 6144,
      "name": "InvalidFeeStructure",
      "msg": "InvalidFeeStructure"
    },
    {
      "code": 6145,
      "name": "InsufficientIFShares",
      "msg": "Insufficient IF shares"
    },
    {
      "code": 6146,
      "name": "MarketActionPaused",
      "msg": "the Market has paused this action"
    },
    {
      "code": 6147,
      "name": "MarketPlaceOrderPaused",
      "msg": "the Market status doesnt allow placing orders"
    },
    {
      "code": 6148,
      "name": "MarketFillOrderPaused",
      "msg": "the Market status doesnt allow filling orders"
    },
    {
      "code": 6149,
      "name": "MarketWithdrawPaused",
      "msg": "the Market status doesnt allow withdraws"
    },
    {
      "code": 6150,
      "name": "ProtectedAssetTierViolation",
      "msg": "Action violates the Protected Asset Tier rules"
    },
    {
      "code": 6151,
      "name": "IsolatedAssetTierViolation",
      "msg": "Action violates the Isolated Asset Tier rules"
    },
    {
      "code": 6152,
      "name": "UserCantBeDeleted",
      "msg": "User Cant Be Deleted"
    },
    {
      "code": 6153,
      "name": "ReduceOnlyWithdrawIncreasedRisk",
      "msg": "Reduce Only Withdraw Increased Risk"
    },
    {
      "code": 6154,
      "name": "MaxOpenInterest",
      "msg": "Max Open Interest"
    },
    {
      "code": 6155,
      "name": "CantResolvePerpBankruptcy",
      "msg": "Cant Resolve Perp Bankruptcy"
    },
    {
      "code": 6156,
      "name": "LiquidationDoesntSatisfyLimitPrice",
      "msg": "Liquidation Doesnt Satisfy Limit Price"
    },
    {
      "code": 6157,
      "name": "MarginTradingDisabled",
      "msg": "Margin Trading Disabled"
    },
    {
      "code": 6158,
      "name": "InvalidMarketStatusToSettlePnl",
      "msg": "Invalid Market Status to Settle Perp Pnl"
    },
    {
      "code": 6159,
      "name": "PerpMarketNotInSettlement",
      "msg": "PerpMarketNotInSettlement"
    },
    {
      "code": 6160,
      "name": "PerpMarketNotInReduceOnly",
      "msg": "PerpMarketNotInReduceOnly"
    },
    {
      "code": 6161,
      "name": "PerpMarketSettlementBufferNotReached",
      "msg": "PerpMarketSettlementBufferNotReached"
    },
    {
      "code": 6162,
      "name": "PerpMarketSettlementUserHasOpenOrders",
      "msg": "PerpMarketSettlementUserHasOpenOrders"
    },
    {
      "code": 6163,
      "name": "PerpMarketSettlementUserHasActiveLP",
      "msg": "PerpMarketSettlementUserHasActiveLP"
    },
    {
      "code": 6164,
      "name": "UnableToSettleExpiredUserPosition",
      "msg": "UnableToSettleExpiredUserPosition"
    },
    {
      "code": 6165,
      "name": "UnequalMarketIndexForSpotTransfer",
      "msg": "UnequalMarketIndexForSpotTransfer"
    },
    {
      "code": 6166,
      "name": "InvalidPerpPositionDetected",
      "msg": "InvalidPerpPositionDetected"
    },
    {
      "code": 6167,
      "name": "InvalidSpotPositionDetected",
      "msg": "InvalidSpotPositionDetected"
    },
    {
      "code": 6168,
      "name": "InvalidAmmDetected",
      "msg": "InvalidAmmDetected"
    },
    {
      "code": 6169,
      "name": "InvalidAmmForFillDetected",
      "msg": "InvalidAmmForFillDetected"
    },
    {
      "code": 6170,
      "name": "InvalidAmmLimitPriceOverride",
      "msg": "InvalidAmmLimitPriceOverride"
    },
    {
      "code": 6171,
      "name": "InvalidOrderFillPrice",
      "msg": "InvalidOrderFillPrice"
    },
    {
      "code": 6172,
      "name": "SpotMarketBalanceInvariantViolated",
      "msg": "SpotMarketBalanceInvariantViolated"
    },
    {
      "code": 6173,
      "name": "SpotMarketVaultInvariantViolated",
      "msg": "SpotMarketVaultInvariantViolated"
    },
    {
      "code": 6174,
      "name": "InvalidPDA",
      "msg": "InvalidPDA"
    },
    {
      "code": 6175,
      "name": "InvalidPDASigner",
      "msg": "InvalidPDASigner"
    },
    {
      "code": 6176,
      "name": "RevenueSettingsCannotSettleToIF",
      "msg": "RevenueSettingsCannotSettleToIF"
    },
    {
      "code": 6177,
      "name": "NoRevenueToSettleToIF",
      "msg": "NoRevenueToSettleToIF"
    },
    {
      "code": 6178,
      "name": "NoAmmPerpPnlDeficit",
      "msg": "NoAmmPerpPnlDeficit"
    },
    {
      "code": 6179,
      "name": "SufficientPerpPnlPool",
      "msg": "SufficientPerpPnlPool"
    },
    {
      "code": 6180,
      "name": "InsufficientPerpPnlPool",
      "msg": "InsufficientPerpPnlPool"
    },
    {
      "code": 6181,
      "name": "PerpPnlDeficitBelowThreshold",
      "msg": "PerpPnlDeficitBelowThreshold"
    },
    {
      "code": 6182,
      "name": "MaxRevenueWithdrawPerPeriodReached",
      "msg": "MaxRevenueWithdrawPerPeriodReached"
    },
    {
      "code": 6183,
      "name": "MaxIFWithdrawReached",
      "msg": "InvalidSpotPositionDetected"
    },
    {
      "code": 6184,
      "name": "NoIFWithdrawAvailable",
      "msg": "NoIFWithdrawAvailable"
    },
    {
      "code": 6185,
      "name": "InvalidIFUnstake",
      "msg": "InvalidIFUnstake"
    },
    {
      "code": 6186,
      "name": "InvalidIFUnstakeSize",
      "msg": "InvalidIFUnstakeSize"
    },
    {
      "code": 6187,
      "name": "InvalidIFUnstakeCancel",
      "msg": "InvalidIFUnstakeCancel"
    },
    {
      "code": 6188,
      "name": "InvalidIFForNewStakes",
      "msg": "InvalidIFForNewStakes"
    },
    {
      "code": 6189,
      "name": "InvalidIFRebase",
      "msg": "InvalidIFRebase"
    },
    {
      "code": 6190,
      "name": "InvalidInsuranceUnstakeSize",
      "msg": "InvalidInsuranceUnstakeSize"
    },
    {
      "code": 6191,
      "name": "InvalidOrderLimitPrice",
      "msg": "InvalidOrderLimitPrice"
    },
    {
      "code": 6192,
      "name": "InvalidIFDetected",
      "msg": "InvalidIFDetected"
    },
    {
      "code": 6193,
      "name": "InvalidAmmMaxSpreadDetected",
      "msg": "InvalidAmmMaxSpreadDetected"
    },
    {
      "code": 6194,
      "name": "InvalidConcentrationCoef",
      "msg": "InvalidConcentrationCoef"
    },
    {
      "code": 6195,
      "name": "InvalidSrmVault",
      "msg": "InvalidSrmVault"
    },
    {
      "code": 6196,
      "name": "InvalidVaultOwner",
      "msg": "InvalidVaultOwner"
    },
    {
      "code": 6197,
      "name": "InvalidMarketStatusForFills",
      "msg": "InvalidMarketStatusForFills"
    },
    {
      "code": 6198,
      "name": "IFWithdrawRequestInProgress",
      "msg": "IFWithdrawRequestInProgress"
    },
    {
      "code": 6199,
      "name": "NoIFWithdrawRequestInProgress",
      "msg": "NoIFWithdrawRequestInProgress"
    },
    {
      "code": 6200,
      "name": "IFWithdrawRequestTooSmall",
      "msg": "IFWithdrawRequestTooSmall"
    },
    {
      "code": 6201,
      "name": "IncorrectSpotMarketAccountPassed",
      "msg": "IncorrectSpotMarketAccountPassed"
    },
    {
      "code": 6202,
      "name": "BlockchainClockInconsistency",
      "msg": "BlockchainClockInconsistency"
    },
    {
      "code": 6203,
      "name": "InvalidIFSharesDetected",
      "msg": "InvalidIFSharesDetected"
    },
    {
      "code": 6204,
      "name": "NewLPSizeTooSmall",
      "msg": "NewLPSizeTooSmall"
    },
    {
      "code": 6205,
      "name": "MarketStatusInvalidForNewLP",
      "msg": "MarketStatusInvalidForNewLP"
    },
    {
      "code": 6206,
      "name": "InvalidMarkTwapUpdateDetected",
      "msg": "InvalidMarkTwapUpdateDetected"
    },
    {
      "code": 6207,
      "name": "MarketSettlementAttemptOnActiveMarket",
      "msg": "MarketSettlementAttemptOnActiveMarket"
    },
    {
      "code": 6208,
      "name": "MarketSettlementRequiresSettledLP",
      "msg": "MarketSettlementRequiresSettledLP"
    },
    {
      "code": 6209,
      "name": "MarketSettlementAttemptTooEarly",
      "msg": "MarketSettlementAttemptTooEarly"
    },
    {
      "code": 6210,
      "name": "MarketSettlementTargetPriceInvalid",
      "msg": "MarketSettlementTargetPriceInvalid"
    },
    {
      "code": 6211,
      "name": "UnsupportedSpotMarket",
      "msg": "UnsupportedSpotMarket"
    },
    {
      "code": 6212,
      "name": "SpotOrdersDisabled",
      "msg": "SpotOrdersDisabled"
    },
    {
      "code": 6213,
      "name": "MarketBeingInitialized",
      "msg": "Market Being Initialized"
    },
    {
      "code": 6214,
      "name": "InvalidUserSubAccountId",
      "msg": "Invalid Sub Account Id"
    },
    {
      "code": 6215,
      "name": "InvalidTriggerOrderCondition",
      "msg": "Invalid Trigger Order Condition"
    },
    {
      "code": 6216,
      "name": "InvalidSpotPosition",
      "msg": "Invalid Spot Position"
    },
    {
      "code": 6217,
      "name": "CantTransferBetweenSameUserAccount",
      "msg": "Cant transfer between same user account"
    },
    {
      "code": 6218,
      "name": "InvalidPerpPosition",
      "msg": "Invalid Perp Position"
    },
    {
      "code": 6219,
      "name": "UnableToGetLimitPrice",
      "msg": "Unable To Get Limit Price"
    },
    {
      "code": 6220,
      "name": "InvalidLiquidation",
      "msg": "Invalid Liquidation"
    },
    {
      "code": 6221,
      "name": "SpotFulfillmentConfigDisabled",
      "msg": "Spot Fulfillment Config Disabled"
    },
    {
      "code": 6222,
      "name": "InvalidMaker",
      "msg": "Invalid Maker"
    },
    {
      "code": 6223,
      "name": "FailedUnwrap",
      "msg": "Failed Unwrap"
    },
    {
      "code": 6224,
      "name": "MaxNumberOfUsers",
      "msg": "Max Number Of Users"
    },
    {
      "code": 6225,
      "name": "InvalidOracleForSettlePnl",
      "msg": "InvalidOracleForSettlePnl"
    },
    {
      "code": 6226,
      "name": "MarginOrdersOpen",
      "msg": "MarginOrdersOpen"
    },
    {
      "code": 6227,
      "name": "TierViolationLiquidatingPerpPnl",
      "msg": "TierViolationLiquidatingPerpPnl"
    },
    {
      "code": 6228,
      "name": "CouldNotLoadUserData",
      "msg": "CouldNotLoadUserData"
    },
    {
      "code": 6229,
      "name": "UserWrongMutability",
      "msg": "UserWrongMutability"
    },
    {
      "code": 6230,
      "name": "InvalidUserAccount",
      "msg": "InvalidUserAccount"
    },
    {
      "code": 6231,
      "name": "CouldNotLoadUserStatsData",
      "msg": "CouldNotLoadUserData"
    },
    {
      "code": 6232,
      "name": "UserStatsWrongMutability",
      "msg": "UserWrongMutability"
    },
    {
      "code": 6233,
      "name": "InvalidUserStatsAccount",
      "msg": "InvalidUserAccount"
    },
    {
      "code": 6234,
      "name": "UserNotFound",
      "msg": "UserNotFound"
    },
    {
      "code": 6235,
      "name": "UnableToLoadUserAccount",
      "msg": "UnableToLoadUserAccount"
    },
    {
      "code": 6236,
      "name": "UserStatsNotFound",
      "msg": "UserStatsNotFound"
    },
    {
      "code": 6237,
      "name": "UnableToLoadUserStatsAccount",
      "msg": "UnableToLoadUserStatsAccount"
    },
    {
      "code": 6238,
      "name": "UserNotInactive",
      "msg": "User Not Inactive"
    },
    {
      "code": 6239,
      "name": "RevertFill",
      "msg": "RevertFill"
    },
    {
      "code": 6240,
      "name": "InvalidMarketAccountforDeletion",
      "msg": "Invalid MarketAccount for Deletion"
    },
    {
      "code": 6241,
      "name": "InvalidSpotFulfillmentParams",
      "msg": "Invalid Spot Fulfillment Params"
    },
    {
      "code": 6242,
      "name": "FailedToGetMint",
      "msg": "Failed to Get Mint"
    },
    {
      "code": 6243,
      "name": "FailedPhoenixCPI",
      "msg": "FailedPhoenixCPI"
    },
    {
      "code": 6244,
      "name": "FailedToDeserializePhoenixMarket",
      "msg": "FailedToDeserializePhoenixMarket"
    },
    {
      "code": 6245,
      "name": "InvalidPricePrecision",
      "msg": "InvalidPricePrecision"
    },
    {
      "code": 6246,
      "name": "InvalidPhoenixProgram",
      "msg": "InvalidPhoenixProgram"
    },
    {
      "code": 6247,
      "name": "InvalidPhoenixMarket",
      "msg": "InvalidPhoenixMarket"
    },
    {
      "code": 6248,
      "name": "InvalidSwap",
      "msg": "InvalidSwap"
    },
    {
      "code": 6249,
      "name": "SwapLimitPriceBreached",
      "msg": "SwapLimitPriceBreached"
    },
    {
      "code": 6250,
      "name": "SpotMarketReduceOnly",
      "msg": "SpotMarketReduceOnly"
    },
    {
      "code": 6251,
      "name": "FundingWasNotUpdated",
      "msg": "FundingWasNotUpdated"
    },
    {
      "code": 6252,
      "name": "ImpossibleFill",
      "msg": "ImpossibleFill"
    },
    {
      "code": 6253,
      "name": "CantUpdatePerpBidAskTwap",
      "msg": "CantUpdatePerpBidAskTwap"
    },
    {
      "code": 6254,
      "name": "UserReduceOnly",
      "msg": "UserReduceOnly"
    },
    {
      "code": 6255,
      "name": "InvalidMarginCalculation",
      "msg": "InvalidMarginCalculation"
    },
    {
      "code": 6256,
      "name": "CantPayUserInitFee",
      "msg": "CantPayUserInitFee"
    },
    {
      "code": 6257,
      "name": "CantReclaimRent",
      "msg": "CantReclaimRent"
    },
    {
      "code": 6258,
      "name": "InsuranceFundOperationPaused",
      "msg": "InsuranceFundOperationPaused"
    },
    {
      "code": 6259,
      "name": "NoUnsettledPnl",
      "msg": "NoUnsettledPnl"
    },
    {
      "code": 6260,
      "name": "PnlPoolCantSettleUser",
      "msg": "PnlPoolCantSettleUser"
    },
    {
      "code": 6261,
      "name": "OracleNonPositive",
      "msg": "OracleInvalid"
    },
    {
      "code": 6262,
      "name": "OracleTooVolatile",
      "msg": "OracleTooVolatile"
    },
    {
      "code": 6263,
      "name": "OracleTooUncertain",
      "msg": "OracleTooUncertain"
    },
    {
      "code": 6264,
      "name": "OracleStaleForMargin",
      "msg": "OracleStaleForMargin"
    },
    {
      "code": 6265,
      "name": "OracleInsufficientDataPoints",
      "msg": "OracleInsufficientDataPoints"
    },
    {
      "code": 6266,
      "name": "OracleStaleForAMM",
      "msg": "OracleStaleForAMM"
    },
    {
      "code": 6267,
      "name": "UnableToParsePullOracleMessage",
      "msg": "Unable to parse pull oracle message"
    },
    {
      "code": 6268,
      "name": "MaxBorrows",
      "msg": "Can not borow more than max borrows"
    },
    {
      "code": 6269,
      "name": "OracleUpdatesNotMonotonic",
      "msg": "Updates must be monotonically increasing"
    },
    {
      "code": 6270,
      "name": "OraclePriceFeedMessageMismatch",
      "msg": "Trying to update price feed with the wrong feed id"
    },
    {
      "code": 6271,
      "name": "OracleUnsupportedMessageType",
      "msg": "The message in the update must be a PriceFeedMessage"
    },
    {
      "code": 6272,
      "name": "OracleDeserializeMessageFailed",
      "msg": "Could not deserialize the message in the update"
    },
    {
      "code": 6273,
      "name": "OracleWrongGuardianSetOwner",
      "msg": "Wrong guardian set owner in update price atomic"
    },
    {
      "code": 6274,
      "name": "OracleWrongWriteAuthority",
      "msg": "Oracle post update atomic price feed account must be drift program"
    },
    {
      "code": 6275,
      "name": "OracleWrongVaaOwner",
      "msg": "Oracle vaa owner must be wormhole program"
    },
    {
      "code": 6276,
      "name": "OracleTooManyPriceAccountUpdates",
      "msg": "Multi updates must have 2 or fewer accounts passed in remaining accounts"
    },
    {
      "code": 6277,
      "name": "OracleMismatchedVaaAndPriceUpdates",
      "msg": "Don't have the same remaining accounts number and pyth updates left"
    },
    {
      "code": 6278,
      "name": "OracleBadRemainingAccountPublicKey",
      "msg": "Remaining account passed does not match oracle update derived pda"
    },
    {
      "code": 6279,
      "name": "FailedOpenbookV2CPI",
      "msg": "FailedOpenbookV2CPI"
    },
    {
      "code": 6280,
      "name": "InvalidOpenbookV2Program",
      "msg": "InvalidOpenbookV2Program"
    },
    {
      "code": 6281,
      "name": "InvalidOpenbookV2Market",
      "msg": "InvalidOpenbookV2Market"
    },
    {
      "code": 6282,
      "name": "NonZeroTransferFee",
      "msg": "Non zero transfer fee"
    },
    {
      "code": 6283,
      "name": "LiquidationOrderFailedToFill",
      "msg": "Liquidation order failed to fill"
    },
    {
      "code": 6284,
      "name": "DepreciatedPredictionMarketOrder",
      "msg": "Deprecated"
    },
    {
      "code": 6285,
      "name": "InvalidVerificationIxIndex",
      "msg": "Ed25519 Ix must be before place and make SignedMsg order ix"
    },
    {
      "code": 6286,
      "name": "SigVerificationFailed",
      "msg": "SignedMsg message verificaiton failed"
    },
    {
      "code": 6287,
      "name": "MismatchedSignedMsgOrderParamsMarketIndex",
      "msg": "Market index mismatched b/w taker and maker SignedMsg order params"
    },
    {
      "code": 6288,
      "name": "InvalidSignedMsgOrderParam",
      "msg": "Invalid SignedMsg order param"
    },
    {
      "code": 6289,
      "name": "PlaceAndTakeOrderSuccessConditionFailed",
      "msg": "Place and take order success condition failed"
    },
    {
      "code": 6290,
      "name": "DeprecatedHighLeverageModeConfig",
      "msg": "Deprecated"
    },
    {
      "code": 6291,
      "name": "InvalidRFQUserAccount",
      "msg": "Invalid RFQ User Account"
    },
    {
      "code": 6292,
      "name": "RFQUserAccountWrongMutability",
      "msg": "RFQUserAccount should be mutable"
    },
    {
      "code": 6293,
      "name": "RFQUserAccountFull",
      "msg": "RFQUserAccount has too many active RFQs"
    },
    {
      "code": 6294,
      "name": "RFQOrderNotFilled",
      "msg": "RFQ order not filled as expected"
    },
    {
      "code": 6295,
      "name": "InvalidRFQOrder",
      "msg": "RFQ orders must be jit makers"
    },
    {
      "code": 6296,
      "name": "InvalidRFQMatch",
      "msg": "RFQ matches must be valid"
    },
    {
      "code": 6297,
      "name": "InvalidSignedMsgUserAccount",
      "msg": "Invalid SignedMsg user account"
    },
    {
      "code": 6298,
      "name": "SignedMsgUserAccountWrongMutability",
      "msg": "SignedMsg account wrong mutability"
    },
    {
      "code": 6299,
      "name": "SignedMsgUserOrdersAccountFull",
      "msg": "SignedMsgUserAccount has too many active orders"
    },
    {
      "code": 6300,
      "name": "SignedMsgOrderDoesNotExist",
      "msg": "Order with SignedMsg uuid does not exist"
    },
    {
      "code": 6301,
      "name": "InvalidSignedMsgOrderId",
      "msg": "SignedMsg order id cannot be 0s"
    },
    {
      "code": 6302,
      "name": "InvalidPoolId",
      "msg": "Invalid pool id"
    },
    {
      "code": 6303,
      "name": "InvalidProtectedMakerModeConfig",
      "msg": "Invalid Protected Maker Mode Config"
    },
    {
      "code": 6304,
      "name": "InvalidPythLazerStorageOwner",
      "msg": "Invalid pyth lazer storage owner"
    },
    {
      "code": 6305,
      "name": "UnverifiedPythLazerMessage",
      "msg": "Verification of pyth lazer message failed"
    },
    {
      "code": 6306,
      "name": "InvalidPythLazerMessage",
      "msg": "Invalid pyth lazer message"
    },
    {
      "code": 6307,
      "name": "PythLazerMessagePriceFeedMismatch",
      "msg": "Pyth lazer message does not correspond to correct fed id"
    },
    {
      "code": 6308,
      "name": "InvalidLiquidateSpotWithSwap",
      "msg": "InvalidLiquidateSpotWithSwap"
    },
    {
      "code": 6309,
      "name": "SignedMsgUserContextUserMismatch",
      "msg": "User in SignedMsg message does not match user in ix context"
    },
    {
      "code": 6310,
      "name": "UserFuelOverflowThresholdNotMet",
      "msg": "User fuel overflow threshold not met"
    },
    {
      "code": 6311,
      "name": "FuelOverflowAccountNotFound",
      "msg": "FuelOverflow account not found"
    },
    {
      "code": 6312,
      "name": "InvalidTransferPerpPosition",
      "msg": "Invalid Transfer Perp Position"
    },
    {
      "code": 6313,
      "name": "InvalidSignedMsgUserOrdersResize",
      "msg": "Invalid SignedMsgUserOrders resize"
    },
    {
      "code": 6314,
      "name": "DeprecatedCouldNotDeserializeHighLeverageModeConfig",
      "msg": "Deprecated"
    },
    {
      "code": 6315,
      "name": "InvalidIfRebalanceConfig",
      "msg": "Invalid If Rebalance Config"
    },
    {
      "code": 6316,
      "name": "InvalidIfRebalanceSwap",
      "msg": "Invalid If Rebalance Swap"
    },
    {
      "code": 6317,
      "name": "InvalidRevenueShareResize",
      "msg": "Invalid RevenueShare resize"
    },
    {
      "code": 6318,
      "name": "BuilderRevoked",
      "msg": "Builder has been revoked"
    },
    {
      "code": 6319,
      "name": "InvalidBuilderFee",
      "msg": "Builder fee is greater than max fee bps"
    },
    {
      "code": 6320,
      "name": "RevenueShareEscrowAuthorityMismatch",
      "msg": "RevenueShareEscrow authority mismatch"
    },
    {
      "code": 6321,
      "name": "RevenueShareEscrowOrdersAccountFull",
      "msg": "RevenueShareEscrow has too many active orders"
    },
    {
      "code": 6322,
      "name": "InvalidRevenueShareAccount",
      "msg": "Invalid RevenueShareAccount"
    },
    {
      "code": 6323,
      "name": "CannotRevokeBuilderWithOpenOrders",
      "msg": "Cannot revoke builder with open orders"
    },
    {
      "code": 6324,
      "name": "UnableToLoadRevenueShareAccount",
      "msg": "Unable to load builder account"
    },
    {
      "code": 6325,
      "name": "InvalidConstituent",
      "msg": "Invalid Constituent"
    },
    {
      "code": 6326,
      "name": "InvalidAmmConstituentMappingArgument",
      "msg": "Invalid Amm Constituent Mapping argument"
    },
    {
      "code": 6327,
      "name": "ConstituentNotFound",
      "msg": "Constituent not found"
    },
    {
      "code": 6328,
      "name": "ConstituentCouldNotLoad",
      "msg": "Constituent could not load"
    },
    {
      "code": 6329,
      "name": "ConstituentWrongMutability",
      "msg": "Constituent wrong mutability"
    },
    {
      "code": 6330,
      "name": "WrongNumberOfConstituents",
      "msg": "Wrong number of constituents passed to instruction"
    },
    {
      "code": 6331,
      "name": "InsufficientConstituentTokenBalance",
      "msg": "Insufficient constituent token balance"
    },
    {
      "code": 6332,
      "name": "AMMCacheStale",
      "msg": "Amm Cache data too stale"
    },
    {
      "code": 6333,
      "name": "LpPoolAumDelayed",
      "msg": "LP Pool AUM not updated recently"
    },
    {
      "code": 6334,
      "name": "ConstituentOracleStale",
      "msg": "Constituent oracle is stale"
    },
    {
      "code": 6335,
      "name": "LpInvariantFailed",
      "msg": "LP Invariant failed"
    },
    {
      "code": 6336,
      "name": "InvalidConstituentDerivativeWeights",
      "msg": "Invalid constituent derivative weights"
    },
    {
      "code": 6337,
      "name": "MaxDlpAumBreached",
      "msg": "Max DLP AUM Breached"
    },
    {
      "code": 6338,
      "name": "SettleLpPoolDisabled",
      "msg": "Settle Lp Pool Disabled"
    },
    {
      "code": 6339,
      "name": "MintRedeemLpPoolDisabled",
      "msg": "Mint/Redeem Lp Pool Disabled"
    },
    {
      "code": 6340,
      "name": "LpPoolSettleInvariantBreached",
      "msg": "Settlement amount exceeded"
    },
    {
      "code": 6341,
      "name": "InvalidConstituentOperation",
      "msg": "Invalid constituent operation"
    },
    {
      "code": 6342,
      "name": "Unauthorized",
      "msg": "Unauthorized for operation"
    },
    {
      "code": 6343,
      "name": "InvalidLpPoolId",
      "msg": "Invalid Lp Pool Id for Operation"
    },
    {
      "code": 6344,
      "name": "MarketIndexNotFoundAmmCache",
      "msg": "MarketIndexNotFoundAmmCache"
    },
    {
      "code": 6345,
      "name": "InvalidIsolatedPerpMarket",
      "msg": "Invalid Isolated Perp Market"
    },
    {
      "code": 6346,
      "name": "InvalidOrderScaleOrderCount",
      "msg": "Invalid scale order count - must be between 2 and 10"
    },
    {
      "code": 6347,
      "name": "InvalidOrderScalePriceRange",
      "msg": "Invalid scale order price range"
    },
    {
      "code": 6348,
      "name": "InvalidPerpMarketConfig",
      "msg": "Invalid perp market config"
    },
    {
      "code": 6349,
      "name": "InvalidInsuranceFundWithdrawalRecipient",
      "msg": "Insurance fund withdrawal recipient must be the designated treasury address"
    },
    {
      "code": 6350,
      "name": "SpotDlobTradingDisabled",
      "msg": "Spot DLOB trading is disabled"
    }
  ],
  "types": [
    {
      "name": "AMM",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "oracle",
            "docs": [
              "oracle price data public key"
            ],
            "type": "pubkey"
          },
          {
            "name": "historical_oracle_data",
            "docs": [
              "stores historically witnessed oracle data"
            ],
            "type": {
              "defined": {
                "name": "HistoricalOracleData"
              }
            }
          },
          {
            "name": "base_asset_amount_per_lp",
            "docs": [
              "accumulated base asset amount since inception per lp share",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "quote_asset_amount_per_lp",
            "docs": [
              "accumulated quote asset amount since inception per lp share",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "fee_pool",
            "docs": [
              "partition of fees from perp market trading moved from pnl settlements"
            ],
            "type": {
              "defined": {
                "name": "PoolBalance"
              }
            }
          },
          {
            "name": "base_asset_reserve",
            "docs": [
              "`x` reserves for constant product mm formula (x * y = k)",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "quote_asset_reserve",
            "docs": [
              "`y` reserves for constant product mm formula (x * y = k)",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "concentration_coef",
            "docs": [
              "determines how close the min/max base asset reserve sit vs base reserves",
              "allow for decreasing slippage without increasing liquidity and v.v.",
              "precision: PERCENTAGE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "min_base_asset_reserve",
            "docs": [
              "minimum base_asset_reserve allowed before AMM is unavailable",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "max_base_asset_reserve",
            "docs": [
              "maximum base_asset_reserve allowed before AMM is unavailable",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "sqrt_k",
            "docs": [
              "`sqrt(k)` in constant product mm formula (x * y = k). stored to avoid drift caused by integer math issues",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "peg_multiplier",
            "docs": [
              "normalizing numerical factor for y, its use offers lowest slippage in cp-curve when market is balanced",
              "precision: PEG_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "terminal_quote_asset_reserve",
            "docs": [
              "y when market is balanced. stored to save computation",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "base_asset_amount_long",
            "docs": [
              "always non-negative. tracks number of total longs in market (regardless of counterparty)",
              "precision: BASE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "base_asset_amount_short",
            "docs": [
              "always non-positive. tracks number of total shorts in market (regardless of counterparty)",
              "precision: BASE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "base_asset_amount_with_amm",
            "docs": [
              "tracks net position (longs-shorts) in market with AMM as counterparty",
              "precision: BASE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "base_asset_amount_with_unsettled_lp",
            "docs": [
              "tracks net position (longs-shorts) in market with LPs as counterparty",
              "precision: BASE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "max_open_interest",
            "docs": [
              "max allowed open interest, blocks trades that breach this value",
              "precision: BASE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "quote_asset_amount",
            "docs": [
              "sum of all user's perp quote_asset_amount in market",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "quote_entry_amount_long",
            "docs": [
              "sum of all long user's quote_entry_amount in market",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "quote_entry_amount_short",
            "docs": [
              "sum of all short user's quote_entry_amount in market",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "quote_break_even_amount_long",
            "docs": [
              "sum of all long user's quote_break_even_amount in market",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "quote_break_even_amount_short",
            "docs": [
              "sum of all short user's quote_break_even_amount in market",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "user_lp_shares",
            "docs": [
              "total user lp shares of sqrt_k (protocol owned liquidity = sqrt_k - last_funding_rate)",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "last_funding_rate",
            "docs": [
              "last funding rate in this perp market (unit is quote per base)",
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "last_funding_rate_long",
            "docs": [
              "last funding rate for longs in this perp market (unit is quote per base)",
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "last_funding_rate_short",
            "docs": [
              "last funding rate for shorts in this perp market (unit is quote per base)",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "last_24h_avg_funding_rate",
            "docs": [
              "estimate of last 24h of funding rate perp market (unit is quote per base)",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "total_fee",
            "docs": [
              "total fees collected by this perp market",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "total_mm_fee",
            "docs": [
              "total fees collected by the vAMM's bid/ask spread",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "total_exchange_fee",
            "docs": [
              "total fees collected by exchange fee schedule",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "total_fee_minus_distributions",
            "docs": [
              "total fees minus any recognized upnl and pool withdraws",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "total_fee_withdrawn",
            "docs": [
              "sum of all fees from fee pool withdrawn to revenue pool",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "total_liquidation_fee",
            "docs": [
              "all fees collected by market for liquidations",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "cumulative_funding_rate_long",
            "docs": [
              "accumulated funding rate for longs since inception in market"
            ],
            "type": "i128"
          },
          {
            "name": "cumulative_funding_rate_short",
            "docs": [
              "accumulated funding rate for shorts since inception in market"
            ],
            "type": "i128"
          },
          {
            "name": "total_social_loss",
            "docs": [
              "accumulated social loss paid by users since inception in market"
            ],
            "type": "u128"
          },
          {
            "name": "ask_base_asset_reserve",
            "docs": [
              "transformed base_asset_reserve for users going long",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "ask_quote_asset_reserve",
            "docs": [
              "transformed quote_asset_reserve for users going long",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "bid_base_asset_reserve",
            "docs": [
              "transformed base_asset_reserve for users going short",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "bid_quote_asset_reserve",
            "docs": [
              "transformed quote_asset_reserve for users going short",
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "last_oracle_normalised_price",
            "docs": [
              "the last seen oracle price partially shrunk toward the amm reserve price",
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "last_oracle_reserve_price_spread_pct",
            "docs": [
              "the gap between the oracle price and the reserve price = y * peg_multiplier / x"
            ],
            "type": "i64"
          },
          {
            "name": "last_bid_price_twap",
            "docs": [
              "average estimate of bid price over funding_period",
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_ask_price_twap",
            "docs": [
              "average estimate of ask price over funding_period",
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_mark_price_twap",
            "docs": [
              "average estimate of (bid+ask)/2 price over funding_period",
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_mark_price_twap_5min",
            "docs": [
              "average estimate of (bid+ask)/2 price over FIVE_MINUTES"
            ],
            "type": "u64"
          },
          {
            "name": "last_update_slot",
            "docs": [
              "the last blockchain slot the amm was updated"
            ],
            "type": "u64"
          },
          {
            "name": "last_oracle_conf_pct",
            "docs": [
              "the pct size of the oracle confidence interval",
              "precision: PERCENTAGE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "net_revenue_since_last_funding",
            "docs": [
              "the total_fee_minus_distribution change since the last funding update",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "last_funding_rate_ts",
            "docs": [
              "the last funding rate update unix_timestamp"
            ],
            "type": "i64"
          },
          {
            "name": "funding_period",
            "docs": [
              "the peridocity of the funding rate updates"
            ],
            "type": "i64"
          },
          {
            "name": "order_step_size",
            "docs": [
              "the base step size (increment) of orders",
              "precision: BASE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "order_tick_size",
            "docs": [
              "the price tick size of orders",
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "min_order_size",
            "docs": [
              "the minimum base size of an order",
              "precision: BASE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "mm_oracle_slot",
            "docs": [
              "the max base size a single user can have",
              "precision: BASE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "volume_24h",
            "docs": [
              "estimated total of volume in market",
              "QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "long_intensity_volume",
            "docs": [
              "the volume intensity of long fills against AMM"
            ],
            "type": "u64"
          },
          {
            "name": "short_intensity_volume",
            "docs": [
              "the volume intensity of short fills against AMM"
            ],
            "type": "u64"
          },
          {
            "name": "last_trade_ts",
            "docs": [
              "the blockchain unix timestamp at the time of the last trade"
            ],
            "type": "i64"
          },
          {
            "name": "mark_std",
            "docs": [
              "estimate of standard deviation of the fill (mark) prices",
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "oracle_std",
            "docs": [
              "estimate of standard deviation of the oracle price at each update",
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_mark_price_twap_ts",
            "docs": [
              "the last unix_timestamp the mark twap was updated"
            ],
            "type": "i64"
          },
          {
            "name": "base_spread",
            "docs": [
              "the minimum spread the AMM can quote. also used as step size for some spread logic increases."
            ],
            "type": "u32"
          },
          {
            "name": "max_spread",
            "docs": [
              "the maximum spread the AMM can quote"
            ],
            "type": "u32"
          },
          {
            "name": "long_spread",
            "docs": [
              "the spread for asks vs the reserve price"
            ],
            "type": "u32"
          },
          {
            "name": "short_spread",
            "docs": [
              "the spread for bids vs the reserve price"
            ],
            "type": "u32"
          },
          {
            "name": "mm_oracle_price",
            "docs": [
              "MM oracle price"
            ],
            "type": "i64"
          },
          {
            "name": "max_fill_reserve_fraction",
            "docs": [
              "the fraction of total available liquidity a single fill on the AMM can consume"
            ],
            "type": "u16"
          },
          {
            "name": "max_slippage_ratio",
            "docs": [
              "the maximum slippage a single fill on the AMM can push"
            ],
            "type": "u16"
          },
          {
            "name": "curve_update_intensity",
            "docs": [
              "the update intensity of AMM formulaic updates (adjusting k). 0-100"
            ],
            "type": "u8"
          },
          {
            "name": "amm_jit_intensity",
            "docs": [
              "the jit intensity of AMM. larger intensity means larger participation in jit. 0 means no jit participation.",
              "(0, 100] is intensity for protocol-owned AMM. (100, 200] is intensity for user LP-owned AMM."
            ],
            "type": "u8"
          },
          {
            "name": "oracle_source",
            "docs": [
              "the oracle provider information. used to decode/scale the oracle public key"
            ],
            "type": {
              "defined": {
                "name": "OracleSource"
              }
            }
          },
          {
            "name": "last_oracle_valid",
            "docs": [
              "tracks whether the oracle was considered valid at the last AMM update"
            ],
            "type": "bool"
          },
          {
            "name": "target_base_asset_amount_per_lp",
            "docs": [
              "the target value for `base_asset_amount_per_lp`, used during AMM JIT with LP split",
              "precision: BASE_PRECISION"
            ],
            "type": "i32"
          },
          {
            "name": "per_lp_base",
            "docs": [
              "expo for unit of per_lp, base 10 (if per_lp_base=X, then per_lp unit is 10^X)"
            ],
            "type": "i8"
          },
          {
            "name": "oracle_low_risk_slot_delay_override",
            "docs": [
              "the override for the state.min_perp_auction_duration",
              "0 is no override, -1 is disable speed bump, 1-100 is literal speed bump"
            ],
            "type": "i8"
          },
          {
            "name": "amm_spread_adjustment",
            "docs": [
              "signed scale amm_spread similar to fee_adjustment logic (-100 = 0, 100 = double)"
            ],
            "type": "i8"
          },
          {
            "name": "oracle_slot_delay_override",
            "type": "i8"
          },
          {
            "name": "mm_oracle_sequence_id",
            "type": "u64"
          },
          {
            "name": "net_unsettled_funding_pnl",
            "type": "i64"
          },
          {
            "name": "quote_asset_amount_with_unsettled_lp",
            "type": "i64"
          },
          {
            "name": "reference_price_offset",
            "type": "i32"
          },
          {
            "name": "amm_inventory_spread_adjustment",
            "docs": [
              "signed scale amm_spread similar to fee_adjustment logic (-100 = 0, 100 = double)"
            ],
            "type": "i8"
          },
          {
            "name": "reference_price_offset_deadband_pct",
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                2
              ]
            }
          },
          {
            "name": "last_funding_oracle_twap",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "AddAmmConstituentMappingDatum",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "constituent_index",
            "type": "u16"
          },
          {
            "name": "perp_market_index",
            "type": "u16"
          },
          {
            "name": "weight",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "AdminWithdrawFromInsuranceFundRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "shares_burned",
            "type": "u128"
          },
          {
            "name": "insurance_fund_vault_amount_before",
            "type": "u64"
          },
          {
            "name": "protocol_shares_before",
            "type": "u128"
          },
          {
            "name": "protocol_shares_after",
            "type": "u128"
          },
          {
            "name": "recipient_token_account",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "AmmCache",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "_padding",
            "type": {
              "array": [
                "u8",
                3
              ]
            }
          },
          {
            "name": "cache",
            "type": {
              "vec": {
                "defined": {
                  "name": "CacheInfo"
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "AmmConstituentDatum",
      "serialization": "bytemuck",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "perp_market_index",
            "type": "u16"
          },
          {
            "name": "constituent_index",
            "type": "u16"
          },
          {
            "name": "_padding",
            "type": {
              "array": [
                "u8",
                4
              ]
            }
          },
          {
            "name": "last_slot",
            "type": "u64"
          },
          {
            "name": "weight",
            "docs": [
              "PERCENTAGE_PRECISION. The weight this constituent has on the perp market"
            ],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "AmmConstituentMapping",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "lp_pool",
            "type": "pubkey"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "_padding",
            "type": {
              "array": [
                "u8",
                3
              ]
            }
          },
          {
            "name": "weights",
            "type": {
              "vec": {
                "defined": {
                  "name": "AmmConstituentDatum"
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "AssetTier",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Collateral"
          },
          {
            "name": "Protected"
          },
          {
            "name": "Cross"
          },
          {
            "name": "Isolated"
          },
          {
            "name": "Unlisted"
          }
        ]
      }
    },
    {
      "name": "BuilderInfo",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "max_fee_tenth_bps",
            "type": "u16"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                6
              ]
            }
          }
        ]
      }
    },
    {
      "name": "CacheInfo",
      "serialization": "bytemuck",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "oracle",
            "type": "pubkey"
          },
          {
            "name": "last_fee_pool_token_amount",
            "type": "u128"
          },
          {
            "name": "last_net_pnl_pool_token_amount",
            "type": "i128"
          },
          {
            "name": "last_exchange_fees",
            "type": "u128"
          },
          {
            "name": "last_settle_amm_ex_fees",
            "type": "u128"
          },
          {
            "name": "last_settle_amm_pnl",
            "type": "i128"
          },
          {
            "name": "position",
            "docs": [
              "BASE PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "slot",
            "type": "u64"
          },
          {
            "name": "last_settle_amount",
            "type": "u64"
          },
          {
            "name": "last_settle_slot",
            "type": "u64"
          },
          {
            "name": "last_settle_ts",
            "type": "i64"
          },
          {
            "name": "quote_owed_from_lp_pool",
            "type": "i64"
          },
          {
            "name": "amm_inventory_limit",
            "type": "i64"
          },
          {
            "name": "oracle_price",
            "type": "i64"
          },
          {
            "name": "oracle_slot",
            "type": "u64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "oracle_source",
            "type": "u8"
          },
          {
            "name": "oracle_validity",
            "type": "u8"
          },
          {
            "name": "lp_status_for_perp_market",
            "type": "u8"
          },
          {
            "name": "amm_position_scalar",
            "type": "u8"
          },
          {
            "name": "_padding",
            "type": {
              "array": [
                "u8",
                34
              ]
            }
          }
        ]
      }
    },
    {
      "name": "Constituent",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pubkey",
            "docs": [
              "address of the constituent"
            ],
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "lp_pool",
            "type": "pubkey"
          },
          {
            "name": "vault",
            "type": "pubkey"
          },
          {
            "name": "total_swap_fees",
            "docs": [
              "total fees received by the constituent. Positive = fees received, Negative = fees paid"
            ],
            "type": "i128"
          },
          {
            "name": "spot_balance",
            "docs": [
              "spot borrow-lend balance for constituent"
            ],
            "type": {
              "defined": {
                "name": "ConstituentSpotBalance"
              }
            }
          },
          {
            "name": "last_spot_balance_token_amount",
            "type": "i64"
          },
          {
            "name": "cumulative_spot_interest_accrued_token_amount",
            "type": "i64"
          },
          {
            "name": "max_weight_deviation",
            "docs": [
              "max deviation from target_weight allowed for the constituent",
              "precision: PERCENTAGE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "swap_fee_min",
            "docs": [
              "min fee charged on swaps to/from this constituent",
              "precision: PERCENTAGE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "swap_fee_max",
            "docs": [
              "max fee charged on swaps to/from this constituent",
              "precision: PERCENTAGE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "max_borrow_token_amount",
            "docs": [
              "Max Borrow amount:",
              "precision: token precision"
            ],
            "type": "u64"
          },
          {
            "name": "vault_token_balance",
            "docs": [
              "ata token balance in token precision"
            ],
            "type": "u64"
          },
          {
            "name": "last_oracle_price",
            "type": "i64"
          },
          {
            "name": "last_oracle_slot",
            "type": "u64"
          },
          {
            "name": "oracle_staleness_threshold",
            "docs": [
              "Delay allowed for valid AUM calculation"
            ],
            "type": "u64"
          },
          {
            "name": "flash_loan_initial_token_amount",
            "type": "u64"
          },
          {
            "name": "next_swap_id",
            "docs": [
              "Every swap to/from this constituent has a monotonically increasing id. This is the next id to use"
            ],
            "type": "u64"
          },
          {
            "name": "derivative_weight",
            "docs": [
              "percentable of derivatve weight to go to this specific derivative PERCENTAGE_PRECISION. Zero if no derivative weight"
            ],
            "type": "u64"
          },
          {
            "name": "volatility",
            "type": "u64"
          },
          {
            "name": "constituent_derivative_depeg_threshold",
            "type": "u64"
          },
          {
            "name": "constituent_derivative_index",
            "docs": [
              "The `constituent_index` of the parent constituent. -1 if it is a parent index",
              "Example: if in a pool with SOL (parent) and dSOL (derivative),",
              "SOL.constituent_index = 1, SOL.constituent_derivative_index = -1,",
              "dSOL.constituent_index = 2, dSOL.constituent_derivative_index = 1"
            ],
            "type": "i16"
          },
          {
            "name": "spot_market_index",
            "type": "u16"
          },
          {
            "name": "constituent_index",
            "type": "u16"
          },
          {
            "name": "decimals",
            "type": "u8"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "vault_bump",
            "type": "u8"
          },
          {
            "name": "gamma_inventory",
            "type": "u8"
          },
          {
            "name": "gamma_execution",
            "type": "u8"
          },
          {
            "name": "xi",
            "type": "u8"
          },
          {
            "name": "status",
            "type": "u8"
          },
          {
            "name": "paused_operations",
            "type": "u8"
          },
          {
            "name": "_padding",
            "type": {
              "array": [
                "u8",
                170
              ]
            }
          }
        ]
      }
    },
    {
      "name": "ConstituentCorrelations",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "lp_pool",
            "type": "pubkey"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "_padding",
            "type": {
              "array": [
                "u8",
                3
              ]
            }
          },
          {
            "name": "correlations",
            "type": {
              "vec": "i64"
            }
          }
        ]
      }
    },
    {
      "name": "ConstituentParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "max_weight_deviation",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "swap_fee_min",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "swap_fee_max",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "max_borrow_token_amount",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "oracle_staleness_threshold",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "cost_to_trade_bps",
            "type": {
              "option": "i32"
            }
          },
          {
            "name": "constituent_derivative_index",
            "type": {
              "option": "i16"
            }
          },
          {
            "name": "derivative_weight",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "volatility",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "gamma_execution",
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "gamma_inventory",
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "xi",
            "type": {
              "option": "u8"
            }
          }
        ]
      }
    },
    {
      "name": "ConstituentSpotBalance",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "scaled_balance",
            "docs": [
              "The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow",
              "interest of corresponding market.",
              "precision: token precision"
            ],
            "type": "u128"
          },
          {
            "name": "cumulative_deposits",
            "docs": [
              "The cumulative deposits/borrows a user has made into a market",
              "precision: token mint precision"
            ],
            "type": "i64"
          },
          {
            "name": "market_index",
            "docs": [
              "The market index of the corresponding spot market"
            ],
            "type": "u16"
          },
          {
            "name": "balance_type",
            "docs": [
              "Whether the position is deposit or borrow"
            ],
            "type": {
              "defined": {
                "name": "SpotBalanceType"
              }
            }
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                5
              ]
            }
          }
        ]
      }
    },
    {
      "name": "ConstituentTargetBase",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "lp_pool",
            "type": "pubkey"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "_padding",
            "type": {
              "array": [
                "u8",
                3
              ]
            }
          },
          {
            "name": "targets",
            "type": {
              "vec": {
                "defined": {
                  "name": "TargetsDatum"
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "ContractTier",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "A"
          },
          {
            "name": "B"
          },
          {
            "name": "C"
          },
          {
            "name": "Speculative"
          },
          {
            "name": "HighlySpeculative"
          },
          {
            "name": "Isolated"
          }
        ]
      }
    },
    {
      "name": "ContractType",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Perpetual"
          },
          {
            "name": "DeprecatedFuture"
          },
          {
            "name": "DeprecatedPrediction"
          }
        ]
      }
    },
    {
      "name": "CurveRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "record_id",
            "type": "u64"
          },
          {
            "name": "peg_multiplier_before",
            "type": "u128"
          },
          {
            "name": "base_asset_reserve_before",
            "type": "u128"
          },
          {
            "name": "quote_asset_reserve_before",
            "type": "u128"
          },
          {
            "name": "sqrt_k_before",
            "type": "u128"
          },
          {
            "name": "peg_multiplier_after",
            "type": "u128"
          },
          {
            "name": "base_asset_reserve_after",
            "type": "u128"
          },
          {
            "name": "quote_asset_reserve_after",
            "type": "u128"
          },
          {
            "name": "sqrt_k_after",
            "type": "u128"
          },
          {
            "name": "base_asset_amount_long",
            "docs": [
              "precision: BASE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "base_asset_amount_short",
            "docs": [
              "precision: BASE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "base_asset_amount_with_amm",
            "docs": [
              "precision: BASE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "total_fee",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "total_fee_minus_distributions",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "adjustment_cost",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "oracle_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "fill_record",
            "type": "u128"
          },
          {
            "name": "number_of_users",
            "type": "u32"
          },
          {
            "name": "market_index",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "DeleteUserRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "docs": [
              "unix_timestamp of action"
            ],
            "type": "i64"
          },
          {
            "name": "user_authority",
            "type": "pubkey"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "sub_account_id",
            "type": "u16"
          },
          {
            "name": "keeper",
            "type": {
              "option": "pubkey"
            }
          }
        ]
      }
    },
    {
      "name": "DepositDirection",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Deposit"
          },
          {
            "name": "Withdraw"
          }
        ]
      }
    },
    {
      "name": "DepositExplanation",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "None"
          },
          {
            "name": "Transfer"
          },
          {
            "name": "Borrow"
          },
          {
            "name": "RepayBorrow"
          },
          {
            "name": "Reward"
          }
        ]
      }
    },
    {
      "name": "DepositRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "docs": [
              "unix_timestamp of action"
            ],
            "type": "i64"
          },
          {
            "name": "user_authority",
            "type": "pubkey"
          },
          {
            "name": "user",
            "docs": [
              "user account public key"
            ],
            "type": "pubkey"
          },
          {
            "name": "direction",
            "type": {
              "defined": {
                "name": "DepositDirection"
              }
            }
          },
          {
            "name": "deposit_record_id",
            "type": "u64"
          },
          {
            "name": "amount",
            "docs": [
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "market_index",
            "docs": [
              "spot market index"
            ],
            "type": "u16"
          },
          {
            "name": "oracle_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "market_deposit_balance",
            "docs": [
              "precision: SPOT_BALANCE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "market_withdraw_balance",
            "docs": [
              "precision: SPOT_BALANCE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "market_cumulative_deposit_interest",
            "docs": [
              "precision: SPOT_CUMULATIVE_INTEREST_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "market_cumulative_borrow_interest",
            "docs": [
              "precision: SPOT_CUMULATIVE_INTEREST_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "total_deposits_after",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "total_withdraws_after",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "explanation",
            "type": {
              "defined": {
                "name": "DepositExplanation"
              }
            }
          },
          {
            "name": "transfer_user",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "signer",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "user_token_amount_after",
            "docs": [
              "precision: token mint precision"
            ],
            "type": "i128"
          }
        ]
      }
    },
    {
      "name": "FeeStructure",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "fee_tiers",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "FeeTier"
                  }
                },
                10
              ]
            }
          },
          {
            "name": "filler_reward_structure",
            "type": {
              "defined": {
                "name": "OrderFillerRewardStructure"
              }
            }
          },
          {
            "name": "referrer_reward_epoch_upper_bound",
            "type": "u64"
          },
          {
            "name": "flat_filler_fee",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "FeeTier",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "fee_numerator",
            "type": "u32"
          },
          {
            "name": "fee_denominator",
            "type": "u32"
          },
          {
            "name": "maker_rebate_numerator",
            "type": "u32"
          },
          {
            "name": "maker_rebate_denominator",
            "type": "u32"
          },
          {
            "name": "referrer_reward_numerator",
            "type": "u32"
          },
          {
            "name": "referrer_reward_denominator",
            "type": "u32"
          },
          {
            "name": "referee_fee_numerator",
            "type": "u32"
          },
          {
            "name": "referee_fee_denominator",
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "FuelOverflow",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "docs": [
              "The authority of this overflow account"
            ],
            "type": "pubkey"
          },
          {
            "name": "fuel_insurance",
            "type": "u128"
          },
          {
            "name": "fuel_deposits",
            "type": "u128"
          },
          {
            "name": "fuel_borrows",
            "type": "u128"
          },
          {
            "name": "fuel_positions",
            "type": "u128"
          },
          {
            "name": "fuel_taker",
            "type": "u128"
          },
          {
            "name": "fuel_maker",
            "type": "u128"
          },
          {
            "name": "last_fuel_sweep_ts",
            "type": "u32"
          },
          {
            "name": "last_reset_ts",
            "type": "u32"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u128",
                6
              ]
            }
          }
        ]
      }
    },
    {
      "name": "FuelSeasonRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "fuel_insurance",
            "type": "u128"
          },
          {
            "name": "fuel_deposits",
            "type": "u128"
          },
          {
            "name": "fuel_borrows",
            "type": "u128"
          },
          {
            "name": "fuel_positions",
            "type": "u128"
          },
          {
            "name": "fuel_taker",
            "type": "u128"
          },
          {
            "name": "fuel_maker",
            "type": "u128"
          },
          {
            "name": "fuel_total",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "FuelSweepRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "user_stats_fuel_insurance",
            "type": "u32"
          },
          {
            "name": "user_stats_fuel_deposits",
            "type": "u32"
          },
          {
            "name": "user_stats_fuel_borrows",
            "type": "u32"
          },
          {
            "name": "user_stats_fuel_positions",
            "type": "u32"
          },
          {
            "name": "user_stats_fuel_taker",
            "type": "u32"
          },
          {
            "name": "user_stats_fuel_maker",
            "type": "u32"
          },
          {
            "name": "fuel_overflow_fuel_insurance",
            "type": "u128"
          },
          {
            "name": "fuel_overflow_fuel_deposits",
            "type": "u128"
          },
          {
            "name": "fuel_overflow_fuel_borrows",
            "type": "u128"
          },
          {
            "name": "fuel_overflow_fuel_positions",
            "type": "u128"
          },
          {
            "name": "fuel_overflow_fuel_taker",
            "type": "u128"
          },
          {
            "name": "fuel_overflow_fuel_maker",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "FundingPaymentRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "user_authority",
            "type": "pubkey"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "funding_payment",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "base_asset_amount",
            "docs": [
              "precision: BASE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "user_last_cumulative_funding",
            "docs": [
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "amm_cumulative_funding_long",
            "docs": [
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "amm_cumulative_funding_short",
            "docs": [
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i128"
          }
        ]
      }
    },
    {
      "name": "FundingRateRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "record_id",
            "type": "u64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "funding_rate",
            "docs": [
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "funding_rate_long",
            "docs": [
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "funding_rate_short",
            "docs": [
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "cumulative_funding_rate_long",
            "docs": [
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "cumulative_funding_rate_short",
            "docs": [
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "oracle_price_twap",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "mark_price_twap",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "period_revenue",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "base_asset_amount_with_amm",
            "docs": [
              "precision: BASE_PRECISION"
            ],
            "type": "i128"
          },
          {
            "name": "base_asset_amount_with_unsettled_lp",
            "docs": [
              "precision: BASE_PRECISION"
            ],
            "type": "i128"
          }
        ]
      }
    },
    {
      "name": "HistoricalIndexData",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "last_index_bid_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_index_ask_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_index_price_twap",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_index_price_twap_5min",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_index_price_twap_ts",
            "docs": [
              "unix_timestamp of last snapshot"
            ],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "HistoricalOracleData",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "last_oracle_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "last_oracle_conf",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_oracle_delay",
            "docs": [
              "number of slots since last update"
            ],
            "type": "i64"
          },
          {
            "name": "last_oracle_price_twap",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "last_oracle_price_twap_5min",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "last_oracle_price_twap_ts",
            "docs": [
              "unix_timestamp of last snapshot"
            ],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "IfRebalanceConfig",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pubkey",
            "type": "pubkey"
          },
          {
            "name": "total_in_amount",
            "docs": [
              "total amount to be sold"
            ],
            "type": "u64"
          },
          {
            "name": "current_in_amount",
            "docs": [
              "amount already sold"
            ],
            "type": "u64"
          },
          {
            "name": "current_out_amount",
            "docs": [
              "amount already bought"
            ],
            "type": "u64"
          },
          {
            "name": "current_out_amount_transferred",
            "docs": [
              "amount already transferred to revenue pool"
            ],
            "type": "u64"
          },
          {
            "name": "current_in_amount_since_last_transfer",
            "docs": [
              "amount already bought in epoch"
            ],
            "type": "u64"
          },
          {
            "name": "epoch_start_ts",
            "docs": [
              "start time of epoch"
            ],
            "type": "i64"
          },
          {
            "name": "epoch_in_amount",
            "docs": [
              "amount already bought in epoch"
            ],
            "type": "u64"
          },
          {
            "name": "epoch_max_in_amount",
            "docs": [
              "max amount to swap in epoch"
            ],
            "type": "u64"
          },
          {
            "name": "epoch_duration",
            "docs": [
              "duration of epoch"
            ],
            "type": "i64"
          },
          {
            "name": "out_market_index",
            "docs": [
              "market index to sell"
            ],
            "type": "u16"
          },
          {
            "name": "in_market_index",
            "docs": [
              "market index to buy"
            ],
            "type": "u16"
          },
          {
            "name": "max_slippage_bps",
            "type": "u16"
          },
          {
            "name": "swap_mode",
            "type": "u8"
          },
          {
            "name": "status",
            "type": "u8"
          },
          {
            "name": "padding2",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          }
        ]
      }
    },
    {
      "name": "IfRebalanceConfigParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "total_in_amount",
            "type": "u64"
          },
          {
            "name": "epoch_max_in_amount",
            "type": "u64"
          },
          {
            "name": "epoch_duration",
            "type": "i64"
          },
          {
            "name": "out_market_index",
            "type": "u16"
          },
          {
            "name": "in_market_index",
            "type": "u16"
          },
          {
            "name": "max_slippage_bps",
            "type": "u16"
          },
          {
            "name": "swap_mode",
            "type": "u8"
          },
          {
            "name": "status",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "InsuranceClaim",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "revenue_withdraw_since_last_settle",
            "docs": [
              "The amount of revenue last settled",
              "Positive if funds left the perp market,",
              "negative if funds were pulled into the perp market",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "max_revenue_withdraw_per_period",
            "docs": [
              "The max amount of revenue that can be withdrawn per period",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "quote_max_insurance",
            "docs": [
              "The max amount of insurance that perp market can use to resolve bankruptcy and pnl deficits",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "quote_settled_insurance",
            "docs": [
              "The amount of insurance that has been used to resolve bankruptcy and pnl deficits",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_revenue_withdraw_ts",
            "docs": [
              "The last time revenue was settled in/out of market"
            ],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "InsuranceFund",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "vault",
            "type": "pubkey"
          },
          {
            "name": "total_shares",
            "type": "u128"
          },
          {
            "name": "user_shares",
            "type": "u128"
          },
          {
            "name": "shares_base",
            "type": "u128"
          },
          {
            "name": "unstaking_period",
            "type": "i64"
          },
          {
            "name": "last_revenue_settle_ts",
            "type": "i64"
          },
          {
            "name": "revenue_settle_period",
            "type": "i64"
          },
          {
            "name": "total_factor",
            "type": "u32"
          },
          {
            "name": "user_factor",
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "InsuranceFundRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "spot_market_index",
            "type": "u16"
          },
          {
            "name": "perp_market_index",
            "type": "u16"
          },
          {
            "name": "user_if_factor",
            "docs": [
              "precision: PERCENTAGE_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "total_if_factor",
            "docs": [
              "precision: PERCENTAGE_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "vault_amount_before",
            "docs": [
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "insurance_vault_amount_before",
            "docs": [
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "total_if_shares_before",
            "type": "u128"
          },
          {
            "name": "total_if_shares_after",
            "type": "u128"
          },
          {
            "name": "amount",
            "docs": [
              "precision: token mint precision"
            ],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "InsuranceFundStake",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "if_shares",
            "type": "u128"
          },
          {
            "name": "last_withdraw_request_shares",
            "type": "u128"
          },
          {
            "name": "if_base",
            "type": "u128"
          },
          {
            "name": "last_valid_ts",
            "type": "i64"
          },
          {
            "name": "last_withdraw_request_value",
            "type": "u64"
          },
          {
            "name": "last_withdraw_request_ts",
            "type": "i64"
          },
          {
            "name": "cost_basis",
            "type": "i64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                14
              ]
            }
          }
        ]
      }
    },
    {
      "name": "InsuranceFundStakeRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "user_authority",
            "type": "pubkey"
          },
          {
            "name": "action",
            "type": {
              "defined": {
                "name": "StakeAction"
              }
            }
          },
          {
            "name": "amount",
            "docs": [
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "insurance_vault_amount_before",
            "docs": [
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "if_shares_before",
            "type": "u128"
          },
          {
            "name": "user_if_shares_before",
            "type": "u128"
          },
          {
            "name": "total_if_shares_before",
            "type": "u128"
          },
          {
            "name": "if_shares_after",
            "type": "u128"
          },
          {
            "name": "user_if_shares_after",
            "type": "u128"
          },
          {
            "name": "total_if_shares_after",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "InsuranceFundSwapRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "rebalance_config",
            "type": "pubkey"
          },
          {
            "name": "in_if_total_shares_before",
            "type": "u128"
          },
          {
            "name": "out_if_total_shares_before",
            "type": "u128"
          },
          {
            "name": "in_if_user_shares_before",
            "type": "u128"
          },
          {
            "name": "out_if_user_shares_before",
            "type": "u128"
          },
          {
            "name": "in_if_total_shares_after",
            "type": "u128"
          },
          {
            "name": "out_if_total_shares_after",
            "type": "u128"
          },
          {
            "name": "in_if_user_shares_after",
            "type": "u128"
          },
          {
            "name": "out_if_user_shares_after",
            "type": "u128"
          },
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "in_amount",
            "type": "u64"
          },
          {
            "name": "out_amount",
            "type": "u64"
          },
          {
            "name": "out_oracle_price",
            "type": "u64"
          },
          {
            "name": "out_oracle_price_twap",
            "type": "i64"
          },
          {
            "name": "in_vault_amount_before",
            "type": "u64"
          },
          {
            "name": "out_vault_amount_before",
            "type": "u64"
          },
          {
            "name": "in_fund_vault_amount_after",
            "type": "u64"
          },
          {
            "name": "out_fund_vault_amount_after",
            "type": "u64"
          },
          {
            "name": "in_market_index",
            "type": "u16"
          },
          {
            "name": "out_market_index",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "LPAction",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "AddLiquidity"
          },
          {
            "name": "RemoveLiquidity"
          },
          {
            "name": "SettleLiquidity"
          },
          {
            "name": "RemoveLiquidityDerisk"
          }
        ]
      }
    },
    {
      "name": "LPBorrowLendDepositRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "slot",
            "type": "u64"
          },
          {
            "name": "spot_market_index",
            "type": "u16"
          },
          {
            "name": "constituent_index",
            "type": "u16"
          },
          {
            "name": "direction",
            "type": {
              "defined": {
                "name": "DepositDirection"
              }
            }
          },
          {
            "name": "token_balance",
            "type": "i64"
          },
          {
            "name": "last_token_balance",
            "type": "i64"
          },
          {
            "name": "interest_accrued_token_amount",
            "type": "i64"
          },
          {
            "name": "amount_deposit_withdraw",
            "type": "u64"
          },
          {
            "name": "lp_pool",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "LPMintRedeemRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "slot",
            "type": "u64"
          },
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "description",
            "type": "u8"
          },
          {
            "name": "amount",
            "docs": [
              "precision: continutent mint precision, gross fees"
            ],
            "type": "u128"
          },
          {
            "name": "fee",
            "docs": [
              "precision: fee on amount, constituent market mint precision"
            ],
            "type": "i128"
          },
          {
            "name": "spot_market_index",
            "type": "u16"
          },
          {
            "name": "constituent_index",
            "type": "u16"
          },
          {
            "name": "oracle_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "mint",
            "docs": [
              "token mint"
            ],
            "type": "pubkey"
          },
          {
            "name": "lp_amount",
            "docs": [
              "lp amount, lp mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "lp_fee",
            "docs": [
              "lp fee, lp mint precision"
            ],
            "type": "i64"
          },
          {
            "name": "lp_price",
            "docs": [
              "the fair price of the lp token, PRICE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "mint_redeem_id",
            "type": "u64"
          },
          {
            "name": "last_aum",
            "docs": [
              "LPPool last_aum"
            ],
            "type": "u128"
          },
          {
            "name": "last_aum_slot",
            "type": "u64"
          },
          {
            "name": "in_market_current_weight",
            "docs": [
              "PERCENTAGE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "in_market_target_weight",
            "type": "i64"
          },
          {
            "name": "lp_pool",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "LPPool",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pubkey",
            "docs": [
              "address of the vault."
            ],
            "type": "pubkey"
          },
          {
            "name": "mint",
            "type": "pubkey"
          },
          {
            "name": "whitelist_mint",
            "type": "pubkey"
          },
          {
            "name": "constituent_target_base",
            "type": "pubkey"
          },
          {
            "name": "constituent_correlations",
            "type": "pubkey"
          },
          {
            "name": "max_aum",
            "docs": [
              "The current number of VaultConstituents in the vault, each constituent is pda(LPPool.address, constituent_index)",
              "which constituent is the quote, receives revenue pool distributions. (maybe this should just be implied idx 0)",
              "pub quote_constituent_index: u16,",
              "QUOTE_PRECISION: Max AUM, Prohibit minting new DLP beyond this"
            ],
            "type": "u128"
          },
          {
            "name": "last_aum",
            "docs": [
              "QUOTE_PRECISION: AUM of the vault in USD, updated lazily"
            ],
            "type": "u128"
          },
          {
            "name": "cumulative_quote_sent_to_perp_markets",
            "docs": [
              "QUOTE PRECISION: Cumulative quotes from settles"
            ],
            "type": "u128"
          },
          {
            "name": "cumulative_quote_received_from_perp_markets",
            "type": "u128"
          },
          {
            "name": "total_mint_redeem_fees_paid",
            "docs": [
              "QUOTE_PRECISION: Total fees paid for minting and redeeming LP tokens"
            ],
            "type": "i128"
          },
          {
            "name": "last_aum_slot",
            "docs": [
              "timestamp of last AUM slot"
            ],
            "type": "u64"
          },
          {
            "name": "max_settle_quote_amount",
            "type": "u64"
          },
          {
            "name": "_padding",
            "docs": [
              "timestamp of last vAMM revenue rebalance"
            ],
            "type": "u64"
          },
          {
            "name": "mint_redeem_id",
            "docs": [
              "Every mint/redeem has a monotonically increasing id. This is the next id to use"
            ],
            "type": "u64"
          },
          {
            "name": "settle_id",
            "type": "u64"
          },
          {
            "name": "min_mint_fee",
            "docs": [
              "PERCENTAGE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "token_supply",
            "type": "u64"
          },
          {
            "name": "volatility",
            "type": "u64"
          },
          {
            "name": "constituents",
            "type": "u16"
          },
          {
            "name": "quote_consituent_index",
            "type": "u16"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "gamma_execution",
            "type": "u8"
          },
          {
            "name": "xi",
            "type": "u8"
          },
          {
            "name": "target_oracle_delay_fee_bps_per_10_slots",
            "type": "u8"
          },
          {
            "name": "target_position_delay_fee_bps_per_10_slots",
            "type": "u8"
          },
          {
            "name": "lp_pool_id",
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                182
              ]
            }
          }
        ]
      }
    },
    {
      "name": "LPRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "action",
            "type": {
              "defined": {
                "name": "LPAction"
              }
            }
          },
          {
            "name": "n_shares",
            "docs": [
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "delta_base_asset_amount",
            "docs": [
              "precision: BASE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "delta_quote_asset_amount",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "pnl",
            "docs": [
              "realized pnl of the position settlement",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "LPSettleRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "record_id",
            "type": "u64"
          },
          {
            "name": "last_ts",
            "type": "i64"
          },
          {
            "name": "last_slot",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "slot",
            "type": "u64"
          },
          {
            "name": "perp_market_index",
            "type": "u16"
          },
          {
            "name": "settle_to_lp_amount",
            "type": "i64"
          },
          {
            "name": "perp_amm_pnl_delta",
            "type": "i64"
          },
          {
            "name": "perp_amm_ex_fee_delta",
            "type": "i64"
          },
          {
            "name": "lp_aum",
            "type": "u128"
          },
          {
            "name": "lp_price",
            "type": "u128"
          },
          {
            "name": "lp_pool",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "LPSwapRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "slot",
            "type": "u64"
          },
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "out_amount",
            "docs": [
              "precision: out market mint precision, gross fees"
            ],
            "type": "u128"
          },
          {
            "name": "in_amount",
            "docs": [
              "precision: in market mint precision, gross fees"
            ],
            "type": "u128"
          },
          {
            "name": "out_fee",
            "docs": [
              "precision: fee on amount_out, in market mint precision"
            ],
            "type": "i128"
          },
          {
            "name": "in_fee",
            "docs": [
              "precision: fee on amount_in, out market mint precision"
            ],
            "type": "i128"
          },
          {
            "name": "out_spot_market_index",
            "type": "u16"
          },
          {
            "name": "in_spot_market_index",
            "type": "u16"
          },
          {
            "name": "out_constituent_index",
            "type": "u16"
          },
          {
            "name": "in_constituent_index",
            "type": "u16"
          },
          {
            "name": "out_oracle_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "in_oracle_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "last_aum",
            "docs": [
              "LPPool last_aum, QUOTE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "last_aum_slot",
            "type": "u64"
          },
          {
            "name": "in_market_current_weight",
            "docs": [
              "PERCENTAGE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "out_market_current_weight",
            "docs": [
              "PERCENTAGE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "in_market_target_weight",
            "docs": [
              "PERCENTAGE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "out_market_target_weight",
            "docs": [
              "PERCENTAGE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "in_swap_id",
            "type": "u64"
          },
          {
            "name": "out_swap_id",
            "type": "u64"
          },
          {
            "name": "lp_pool",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "LiquidateBorrowForPerpPnlRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "perp_market_index",
            "type": "u16"
          },
          {
            "name": "market_oracle_price",
            "type": "i64"
          },
          {
            "name": "pnl_transfer",
            "type": "u128"
          },
          {
            "name": "liability_market_index",
            "type": "u16"
          },
          {
            "name": "liability_price",
            "type": "i64"
          },
          {
            "name": "liability_transfer",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "LiquidatePerpPnlForDepositRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "perp_market_index",
            "type": "u16"
          },
          {
            "name": "market_oracle_price",
            "type": "i64"
          },
          {
            "name": "pnl_transfer",
            "type": "u128"
          },
          {
            "name": "asset_market_index",
            "type": "u16"
          },
          {
            "name": "asset_price",
            "type": "i64"
          },
          {
            "name": "asset_transfer",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "LiquidatePerpRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "oracle_price",
            "type": "i64"
          },
          {
            "name": "base_asset_amount",
            "type": "i64"
          },
          {
            "name": "quote_asset_amount",
            "type": "i64"
          },
          {
            "name": "lp_shares",
            "docs": [
              "precision: AMM_RESERVE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "fill_record_id",
            "type": "u64"
          },
          {
            "name": "user_order_id",
            "type": "u32"
          },
          {
            "name": "liquidator_order_id",
            "type": "u32"
          },
          {
            "name": "liquidator_fee",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "if_fee",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "LiquidateSpotRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "asset_market_index",
            "type": "u16"
          },
          {
            "name": "asset_price",
            "type": "i64"
          },
          {
            "name": "asset_transfer",
            "type": "u128"
          },
          {
            "name": "liability_market_index",
            "type": "u16"
          },
          {
            "name": "liability_price",
            "type": "i64"
          },
          {
            "name": "liability_transfer",
            "docs": [
              "precision: token mint precision"
            ],
            "type": "u128"
          },
          {
            "name": "if_fee",
            "docs": [
              "precision: token mint precision"
            ],
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "LiquidationRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "liquidation_type",
            "type": {
              "defined": {
                "name": "LiquidationType"
              }
            }
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "liquidator",
            "type": "pubkey"
          },
          {
            "name": "margin_requirement",
            "type": "u128"
          },
          {
            "name": "total_collateral",
            "type": "i128"
          },
          {
            "name": "margin_freed",
            "type": "u64"
          },
          {
            "name": "liquidation_id",
            "type": "u16"
          },
          {
            "name": "bankrupt",
            "type": "bool"
          },
          {
            "name": "canceled_order_ids",
            "type": {
              "vec": "u32"
            }
          },
          {
            "name": "liquidate_perp",
            "type": {
              "defined": {
                "name": "LiquidatePerpRecord"
              }
            }
          },
          {
            "name": "liquidate_spot",
            "type": {
              "defined": {
                "name": "LiquidateSpotRecord"
              }
            }
          },
          {
            "name": "liquidate_borrow_for_perp_pnl",
            "type": {
              "defined": {
                "name": "LiquidateBorrowForPerpPnlRecord"
              }
            }
          },
          {
            "name": "liquidate_perp_pnl_for_deposit",
            "type": {
              "defined": {
                "name": "LiquidatePerpPnlForDepositRecord"
              }
            }
          },
          {
            "name": "perp_bankruptcy",
            "type": {
              "defined": {
                "name": "PerpBankruptcyRecord"
              }
            }
          },
          {
            "name": "spot_bankruptcy",
            "type": {
              "defined": {
                "name": "SpotBankruptcyRecord"
              }
            }
          },
          {
            "name": "bit_flags",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "LiquidationType",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "LiquidatePerp"
          },
          {
            "name": "LiquidateSpot"
          },
          {
            "name": "LiquidateBorrowForPerpPnl"
          },
          {
            "name": "LiquidatePerpPnlForDeposit"
          },
          {
            "name": "PerpBankruptcy"
          },
          {
            "name": "SpotBankruptcy"
          }
        ]
      }
    },
    {
      "name": "LpPoolParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "max_settle_quote_amount",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "volatility",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "gamma_execution",
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "xi",
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "max_aum",
            "type": {
              "option": "u128"
            }
          },
          {
            "name": "whitelist_mint",
            "type": {
              "option": "pubkey"
            }
          }
        ]
      }
    },
    {
      "name": "MarketStatus",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Initialized"
          },
          {
            "name": "Active"
          },
          {
            "name": "ReduceOnly"
          },
          {
            "name": "Settlement"
          },
          {
            "name": "Delisted"
          }
        ]
      }
    },
    {
      "name": "MarketType",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Spot"
          },
          {
            "name": "Perp"
          }
        ]
      }
    },
    {
      "name": "ModifyOrderParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "direction",
            "type": {
              "option": {
                "defined": {
                  "name": "PositionDirection"
                }
              }
            }
          },
          {
            "name": "base_asset_amount",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "price",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "reduce_only",
            "type": {
              "option": "bool"
            }
          },
          {
            "name": "post_only",
            "type": {
              "option": {
                "defined": {
                  "name": "PostOnlyParam"
                }
              }
            }
          },
          {
            "name": "bit_flags",
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "max_ts",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "trigger_price",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "trigger_condition",
            "type": {
              "option": {
                "defined": {
                  "name": "OrderTriggerCondition"
                }
              }
            }
          },
          {
            "name": "oracle_price_offset",
            "type": {
              "option": "i32"
            }
          },
          {
            "name": "auction_duration",
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "auction_start_price",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "auction_end_price",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "policy",
            "type": {
              "option": "u8"
            }
          }
        ]
      }
    },
    {
      "name": "NewUserRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "docs": [
              "unix_timestamp of action"
            ],
            "type": "i64"
          },
          {
            "name": "user_authority",
            "type": "pubkey"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "sub_account_id",
            "type": "u16"
          },
          {
            "name": "name",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "referrer",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "OpenbookV2FulfillmentConfig",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pubkey",
            "type": "pubkey"
          },
          {
            "name": "openbook_v2_program_id",
            "type": "pubkey"
          },
          {
            "name": "openbook_v2_market",
            "type": "pubkey"
          },
          {
            "name": "openbook_v2_market_authority",
            "type": "pubkey"
          },
          {
            "name": "openbook_v2_event_heap",
            "type": "pubkey"
          },
          {
            "name": "openbook_v2_bids",
            "type": "pubkey"
          },
          {
            "name": "openbook_v2_asks",
            "type": "pubkey"
          },
          {
            "name": "openbook_v2_base_vault",
            "type": "pubkey"
          },
          {
            "name": "openbook_v2_quote_vault",
            "type": "pubkey"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "fulfillment_type",
            "type": {
              "defined": {
                "name": "SpotFulfillmentType"
              }
            }
          },
          {
            "name": "status",
            "type": {
              "defined": {
                "name": "SpotFulfillmentConfigStatus"
              }
            }
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                4
              ]
            }
          }
        ]
      }
    },
    {
      "name": "OracleGuardRails",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "price_divergence",
            "type": {
              "defined": {
                "name": "PriceDivergenceGuardRails"
              }
            }
          },
          {
            "name": "validity",
            "type": {
              "defined": {
                "name": "ValidityGuardRails"
              }
            }
          }
        ]
      }
    },
    {
      "name": "OracleSource",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Pyth"
          },
          {
            "name": "DeprecatedSwitchboard"
          },
          {
            "name": "QuoteAsset"
          },
          {
            "name": "Pyth1K"
          },
          {
            "name": "Pyth1M"
          },
          {
            "name": "PythStableCoin"
          },
          {
            "name": "Prelaunch"
          },
          {
            "name": "PythPull"
          },
          {
            "name": "Pyth1KPull"
          },
          {
            "name": "Pyth1MPull"
          },
          {
            "name": "PythStableCoinPull"
          },
          {
            "name": "DeprecatedSwitchboardOnDemand"
          },
          {
            "name": "PythLazer"
          },
          {
            "name": "PythLazer1K"
          },
          {
            "name": "PythLazer1M"
          },
          {
            "name": "PythLazerStableCoin"
          }
        ]
      }
    },
    {
      "name": "Order",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "slot",
            "docs": [
              "The slot the order was placed"
            ],
            "type": "u64"
          },
          {
            "name": "price",
            "docs": [
              "The limit price for the order (can be 0 for market orders)",
              "For orders with an auction, this price isn't used until the auction is complete",
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "base_asset_amount",
            "docs": [
              "The size of the order",
              "precision for perps: BASE_PRECISION",
              "precision for spot: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "base_asset_amount_filled",
            "docs": [
              "The amount of the order filled",
              "precision for perps: BASE_PRECISION",
              "precision for spot: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "quote_asset_amount_filled",
            "docs": [
              "The amount of quote filled for the order",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "trigger_price",
            "docs": [
              "At what price the order will be triggered. Only relevant for trigger orders",
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "auction_start_price",
            "docs": [
              "The start price for the auction. Only relevant for market/oracle orders",
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "auction_end_price",
            "docs": [
              "The end price for the auction. Only relevant for market/oracle orders",
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "max_ts",
            "docs": [
              "The time when the order will expire"
            ],
            "type": "i64"
          },
          {
            "name": "oracle_price_offset",
            "docs": [
              "If set, the order limit price is the oracle price + this offset",
              "precision: PRICE_PRECISION"
            ],
            "type": "i32"
          },
          {
            "name": "order_id",
            "docs": [
              "The id for the order. Each users has their own order id space"
            ],
            "type": "u32"
          },
          {
            "name": "market_index",
            "docs": [
              "The perp/spot market index"
            ],
            "type": "u16"
          },
          {
            "name": "status",
            "docs": [
              "Whether the order is open or unused"
            ],
            "type": {
              "defined": {
                "name": "OrderStatus"
              }
            }
          },
          {
            "name": "order_type",
            "docs": [
              "The type of order"
            ],
            "type": {
              "defined": {
                "name": "OrderType"
              }
            }
          },
          {
            "name": "market_type",
            "docs": [
              "Whether market is spot or perp"
            ],
            "type": {
              "defined": {
                "name": "MarketType"
              }
            }
          },
          {
            "name": "user_order_id",
            "docs": [
              "User generated order id. Can make it easier to place/cancel orders"
            ],
            "type": "u8"
          },
          {
            "name": "existing_position_direction",
            "docs": [
              "What the users position was when the order was placed"
            ],
            "type": {
              "defined": {
                "name": "PositionDirection"
              }
            }
          },
          {
            "name": "direction",
            "docs": [
              "Whether the user is going long or short. LONG = bid, SHORT = ask"
            ],
            "type": {
              "defined": {
                "name": "PositionDirection"
              }
            }
          },
          {
            "name": "reduce_only",
            "docs": [
              "Whether the order is allowed to only reduce position size"
            ],
            "type": "bool"
          },
          {
            "name": "post_only",
            "docs": [
              "Whether the order must be a maker"
            ],
            "type": "bool"
          },
          {
            "name": "immediate_or_cancel",
            "docs": [
              "Whether the order must be canceled the same slot it is placed"
            ],
            "type": "bool"
          },
          {
            "name": "trigger_condition",
            "docs": [
              "Whether the order is triggered above or below the trigger price. Only relevant for trigger orders"
            ],
            "type": {
              "defined": {
                "name": "OrderTriggerCondition"
              }
            }
          },
          {
            "name": "auction_duration",
            "docs": [
              "How many slots the auction lasts"
            ],
            "type": "u8"
          },
          {
            "name": "posted_slot_tail",
            "docs": [
              "Last 8 bits of the slot the order was posted on-chain (not order slot for signed msg orders)"
            ],
            "type": "u8"
          },
          {
            "name": "bit_flags",
            "docs": [
              "Bitflags for further classification",
              "0: is_signed_message"
            ],
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                1
              ]
            }
          }
        ]
      }
    },
    {
      "name": "OrderAction",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Place"
          },
          {
            "name": "Cancel"
          },
          {
            "name": "Fill"
          },
          {
            "name": "Trigger"
          },
          {
            "name": "Expire"
          }
        ]
      }
    },
    {
      "name": "OrderActionExplanation",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "None"
          },
          {
            "name": "InsufficientFreeCollateral"
          },
          {
            "name": "OraclePriceBreachedLimitPrice"
          },
          {
            "name": "MarketOrderFilledToLimitPrice"
          },
          {
            "name": "OrderExpired"
          },
          {
            "name": "Liquidation"
          },
          {
            "name": "OrderFilledWithAMM"
          },
          {
            "name": "OrderFilledWithAMMJit"
          },
          {
            "name": "OrderFilledWithMatch"
          },
          {
            "name": "OrderFilledWithMatchJit"
          },
          {
            "name": "MarketExpired"
          },
          {
            "name": "RiskingIncreasingOrder"
          },
          {
            "name": "ReduceOnlyOrderIncreasedPosition"
          },
          {
            "name": "OrderFillWithSerum"
          },
          {
            "name": "NoBorrowLiquidity"
          },
          {
            "name": "OrderFillWithPhoenix"
          },
          {
            "name": "OrderFilledWithAMMJitLPSplit"
          },
          {
            "name": "OrderFilledWithLPJit"
          },
          {
            "name": "DeriskLp"
          },
          {
            "name": "OrderFilledWithOpenbookV2"
          },
          {
            "name": "TransferPerpPosition"
          }
        ]
      }
    },
    {
      "name": "OrderActionRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "action",
            "type": {
              "defined": {
                "name": "OrderAction"
              }
            }
          },
          {
            "name": "action_explanation",
            "type": {
              "defined": {
                "name": "OrderActionExplanation"
              }
            }
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "market_type",
            "type": {
              "defined": {
                "name": "MarketType"
              }
            }
          },
          {
            "name": "filler",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "filler_reward",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "fill_record_id",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "base_asset_amount_filled",
            "docs": [
              "precision: BASE_PRECISION (perp) or MINT_PRECISION (spot)"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "quote_asset_amount_filled",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "taker_fee",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "maker_fee",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "referrer_reward",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": {
              "option": "u32"
            }
          },
          {
            "name": "quote_asset_amount_surplus",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "spot_fulfillment_method_fee",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "taker",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "taker_order_id",
            "type": {
              "option": "u32"
            }
          },
          {
            "name": "taker_order_direction",
            "type": {
              "option": {
                "defined": {
                  "name": "PositionDirection"
                }
              }
            }
          },
          {
            "name": "taker_order_base_asset_amount",
            "docs": [
              "precision: BASE_PRECISION (perp) or MINT_PRECISION (spot)"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "taker_order_cumulative_base_asset_amount_filled",
            "docs": [
              "precision: BASE_PRECISION (perp) or MINT_PRECISION (spot)"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "taker_order_cumulative_quote_asset_amount_filled",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "maker",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "maker_order_id",
            "type": {
              "option": "u32"
            }
          },
          {
            "name": "maker_order_direction",
            "type": {
              "option": {
                "defined": {
                  "name": "PositionDirection"
                }
              }
            }
          },
          {
            "name": "maker_order_base_asset_amount",
            "docs": [
              "precision: BASE_PRECISION (perp) or MINT_PRECISION (spot)"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "maker_order_cumulative_base_asset_amount_filled",
            "docs": [
              "precision: BASE_PRECISION (perp) or MINT_PRECISION (spot)"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "maker_order_cumulative_quote_asset_amount_filled",
            "docs": [
              "precision: QUOTE_PRECISION"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "oracle_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "bit_flags",
            "docs": [
              "Order bit flags, defined in [`crate::state::user::OrderBitFlag`]"
            ],
            "type": "u8"
          },
          {
            "name": "taker_existing_quote_entry_amount",
            "docs": [
              "precision: QUOTE_PRECISION",
              "Only Some if the taker reduced position"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "taker_existing_base_asset_amount",
            "docs": [
              "precision: BASE_PRECISION",
              "Only Some if the taker flipped position direction"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "maker_existing_quote_entry_amount",
            "docs": [
              "precision: QUOTE_PRECISION",
              "Only Some if the maker reduced position"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "maker_existing_base_asset_amount",
            "docs": [
              "precision: BASE_PRECISION",
              "Only Some if the maker flipped position direction"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "trigger_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "builder_idx",
            "docs": [
              "the idx of the builder in the taker's [`RevenueShareEscrow`] account"
            ],
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "builder_fee",
            "docs": [
              "precision: QUOTE_PRECISION builder fee paid by the taker"
            ],
            "type": {
              "option": "u64"
            }
          }
        ]
      }
    },
    {
      "name": "OrderFillerRewardStructure",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "reward_numerator",
            "type": "u32"
          },
          {
            "name": "reward_denominator",
            "type": "u32"
          },
          {
            "name": "time_based_reward_lower_bound",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "OrderParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "order_type",
            "type": {
              "defined": {
                "name": "OrderType"
              }
            }
          },
          {
            "name": "market_type",
            "type": {
              "defined": {
                "name": "MarketType"
              }
            }
          },
          {
            "name": "direction",
            "type": {
              "defined": {
                "name": "PositionDirection"
              }
            }
          },
          {
            "name": "user_order_id",
            "type": "u8"
          },
          {
            "name": "base_asset_amount",
            "type": "u64"
          },
          {
            "name": "price",
            "type": "u64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "reduce_only",
            "type": "bool"
          },
          {
            "name": "post_only",
            "type": {
              "defined": {
                "name": "PostOnlyParam"
              }
            }
          },
          {
            "name": "bit_flags",
            "type": "u8"
          },
          {
            "name": "max_ts",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "trigger_price",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "trigger_condition",
            "type": {
              "defined": {
                "name": "OrderTriggerCondition"
              }
            }
          },
          {
            "name": "oracle_price_offset",
            "type": {
              "option": "i32"
            }
          },
          {
            "name": "auction_duration",
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "auction_start_price",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "auction_end_price",
            "type": {
              "option": "i64"
            }
          }
        ]
      }
    },
    {
      "name": "OrderRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "order",
            "type": {
              "defined": {
                "name": "Order"
              }
            }
          }
        ]
      }
    },
    {
      "name": "OrderStatus",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Init"
          },
          {
            "name": "Open"
          },
          {
            "name": "Filled"
          },
          {
            "name": "Canceled"
          }
        ]
      }
    },
    {
      "name": "OrderTriggerCondition",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Above"
          },
          {
            "name": "Below"
          },
          {
            "name": "TriggeredAbove"
          },
          {
            "name": "TriggeredBelow"
          }
        ]
      }
    },
    {
      "name": "OrderType",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Market"
          },
          {
            "name": "Limit"
          },
          {
            "name": "TriggerMarket"
          },
          {
            "name": "TriggerLimit"
          },
          {
            "name": "Oracle"
          }
        ]
      }
    },
    {
      "name": "OverrideAmmCacheParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "quote_owed_from_lp_pool",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "last_settle_slot",
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "last_fee_pool_token_amount",
            "type": {
              "option": "u128"
            }
          },
          {
            "name": "last_net_pnl_pool_token_amount",
            "type": {
              "option": "i128"
            }
          },
          {
            "name": "amm_position_scalar",
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "amm_inventory_limit",
            "type": {
              "option": "i64"
            }
          }
        ]
      }
    },
    {
      "name": "PerpBankruptcyRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "pnl",
            "type": "i128"
          },
          {
            "name": "if_payment",
            "type": "u128"
          },
          {
            "name": "clawback_user",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "clawback_user_payment",
            "type": {
              "option": "u128"
            }
          },
          {
            "name": "cumulative_funding_rate_delta",
            "type": "i128"
          }
        ]
      }
    },
    {
      "name": "PerpMarket",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pubkey",
            "docs": [
              "The perp market's address. It is a pda of the market index"
            ],
            "type": "pubkey"
          },
          {
            "name": "amm",
            "docs": [
              "The automated market maker"
            ],
            "type": {
              "defined": {
                "name": "AMM"
              }
            }
          },
          {
            "name": "pnl_pool",
            "docs": [
              "The market's pnl pool. When users settle negative pnl, the balance increases.",
              "When users settle positive pnl, the balance decreases. Can not go negative."
            ],
            "type": {
              "defined": {
                "name": "PoolBalance"
              }
            }
          },
          {
            "name": "name",
            "docs": [
              "Encoded display name for the perp market e.g. SOL-PERP"
            ],
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "insurance_claim",
            "docs": [
              "The perp market's claim on the insurance fund"
            ],
            "type": {
              "defined": {
                "name": "InsuranceClaim"
              }
            }
          },
          {
            "name": "unrealized_pnl_max_imbalance",
            "docs": [
              "The max pnl imbalance before positive pnl asset weight is discounted",
              "pnl imbalance is the difference between long and short pnl. When it's greater than 0,",
              "the amm has negative pnl and the initial asset weight for positive pnl is discounted",
              "precision = QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "expiry_ts",
            "docs": [
              "The ts when the market will be expired. Only set if market is in reduce only mode"
            ],
            "type": "i64"
          },
          {
            "name": "expiry_price",
            "docs": [
              "The price at which positions will be settled. Only set if market is expired",
              "precision = PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "next_fill_record_id",
            "docs": [
              "Every trade has a fill record id. This is the next id to be used"
            ],
            "type": "u64"
          },
          {
            "name": "next_funding_rate_record_id",
            "docs": [
              "Every funding rate update has a record id. This is the next id to be used"
            ],
            "type": "u64"
          },
          {
            "name": "next_curve_record_id",
            "docs": [
              "Every amm k updated has a record id. This is the next id to be used"
            ],
            "type": "u64"
          },
          {
            "name": "imf_factor",
            "docs": [
              "The initial margin fraction factor. Used to increase margin ratio for large positions",
              "precision: MARGIN_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "unrealized_pnl_imf_factor",
            "docs": [
              "The imf factor for unrealized pnl. Used to discount asset weight for large positive pnl",
              "precision: MARGIN_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "liquidator_fee",
            "docs": [
              "The fee the liquidator is paid for taking over perp position",
              "precision: LIQUIDATOR_FEE_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "if_liquidation_fee",
            "docs": [
              "The fee the insurance fund receives from liquidation",
              "precision: LIQUIDATOR_FEE_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "margin_ratio_initial",
            "docs": [
              "The margin ratio which determines how much collateral is required to open a position",
              "e.g. margin ratio of .1 means a user must have $100 of total collateral to open a $1000 position",
              "precision: MARGIN_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "margin_ratio_maintenance",
            "docs": [
              "The margin ratio which determines when a user will be liquidated",
              "e.g. margin ratio of .05 means a user must have $50 of total collateral to maintain a $1000 position",
              "else they will be liquidated",
              "precision: MARGIN_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "unrealized_pnl_initial_asset_weight",
            "docs": [
              "The initial asset weight for positive pnl. Negative pnl always has an asset weight of 1",
              "precision: SPOT_WEIGHT_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "unrealized_pnl_maintenance_asset_weight",
            "docs": [
              "The maintenance asset weight for positive pnl. Negative pnl always has an asset weight of 1",
              "precision: SPOT_WEIGHT_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "number_of_users_with_base",
            "docs": [
              "number of users in a position (base)"
            ],
            "type": "u32"
          },
          {
            "name": "number_of_users",
            "docs": [
              "number of users in a position (pnl) or pnl (quote)"
            ],
            "type": "u32"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "status",
            "docs": [
              "Whether a market is active, reduce only, expired, etc",
              "Affects whether users can open/close positions"
            ],
            "type": {
              "defined": {
                "name": "MarketStatus"
              }
            }
          },
          {
            "name": "contract_type",
            "docs": [
              "Currently only Perpetual markets are supported"
            ],
            "type": {
              "defined": {
                "name": "ContractType"
              }
            }
          },
          {
            "name": "contract_tier",
            "docs": [
              "The contract tier determines how much insurance a market can receive, with more speculative markets receiving less insurance",
              "It also influences the order perp markets can be liquidated, with less speculative markets being liquidated first"
            ],
            "type": {
              "defined": {
                "name": "ContractTier"
              }
            }
          },
          {
            "name": "paused_operations",
            "type": "u8"
          },
          {
            "name": "quote_spot_market_index",
            "docs": [
              "The spot market that pnl is settled in"
            ],
            "type": "u16"
          },
          {
            "name": "fee_adjustment",
            "docs": [
              "Between -100 and 100, represents what % to increase/decrease the fee by",
              "E.g. if this is -50 and the fee is 5bps, the new fee will be 2.5bps",
              "if this is 50 and the fee is 5bps, the new fee will be 7.5bps"
            ],
            "type": "i16"
          },
          {
            "name": "fuel_boost_position",
            "docs": [
              "fuel multiplier for perp funding",
              "precision: 10"
            ],
            "type": "u8"
          },
          {
            "name": "fuel_boost_taker",
            "docs": [
              "fuel multiplier for perp taker",
              "precision: 10"
            ],
            "type": "u8"
          },
          {
            "name": "fuel_boost_maker",
            "docs": [
              "fuel multiplier for perp maker",
              "precision: 10"
            ],
            "type": "u8"
          },
          {
            "name": "pool_id",
            "type": "u8"
          },
          {
            "name": "padding_former_hlm",
            "docs": [
              "Deprecated: formerly high_leverage_margin_ratio_initial and high_leverage_margin_ratio_maintenance"
            ],
            "type": {
              "array": [
                "u8",
                4
              ]
            }
          },
          {
            "name": "protected_maker_limit_price_divisor",
            "type": "u8"
          },
          {
            "name": "protected_maker_dynamic_divisor",
            "type": "u8"
          },
          {
            "name": "lp_fee_transfer_scalar",
            "type": "u8"
          },
          {
            "name": "lp_status",
            "type": "u8"
          },
          {
            "name": "lp_paused_operations",
            "type": "u8"
          },
          {
            "name": "lp_exchange_fee_excluscion_scalar",
            "type": "u8"
          },
          {
            "name": "last_fill_price",
            "type": "u64"
          },
          {
            "name": "lp_pool_id",
            "type": "u8"
          },
          {
            "name": "market_config",
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                30
              ]
            }
          }
        ]
      }
    },
    {
      "name": "PerpPosition",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "last_cumulative_funding_rate",
            "docs": [
              "The perp market's last cumulative funding rate. Used to calculate the funding payment owed to user",
              "precision: FUNDING_RATE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "base_asset_amount",
            "docs": [
              "the size of the users perp position",
              "precision: BASE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "quote_asset_amount",
            "docs": [
              "Used to calculate the users pnl. Upon entry, is equal to base_asset_amount * avg entry price - fees",
              "Updated when the user open/closes position or settles pnl. Includes fees/funding",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "quote_break_even_amount",
            "docs": [
              "The amount of quote the user would need to exit their position at to break even",
              "Updated when the user open/closes position or settles pnl. Includes fees/funding",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "quote_entry_amount",
            "docs": [
              "The amount quote the user entered the position with. Equal to base asset amount * avg entry price",
              "Updated when the user open/closes position. Excludes fees/funding",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "open_bids",
            "docs": [
              "The amount of non reduce only trigger orders the user has open",
              "precision: BASE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "open_asks",
            "docs": [
              "The amount of non reduce only trigger orders the user has open",
              "precision: BASE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "settled_pnl",
            "docs": [
              "The amount of pnl settled in this market since opening the position",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "lp_shares",
            "docs": [
              "The number of lp (liquidity provider) shares the user has in this perp market",
              "LP shares allow users to provide liquidity via the AMM",
              "precision: BASE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "isolated_position_scaled_balance",
            "docs": [
              "The scaled balance of the isolated position",
              "precision: SPOT_BALANCE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_quote_asset_amount_per_lp",
            "docs": [
              "The last quote asset amount per lp the amm had",
              "Used to settle the users lp position",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                2
              ]
            }
          },
          {
            "name": "max_margin_ratio",
            "type": "u16"
          },
          {
            "name": "market_index",
            "docs": [
              "The market index for the perp market"
            ],
            "type": "u16"
          },
          {
            "name": "open_orders",
            "docs": [
              "The number of open orders"
            ],
            "type": "u8"
          },
          {
            "name": "position_flag",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "PhoenixV1FulfillmentConfig",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pubkey",
            "type": "pubkey"
          },
          {
            "name": "phoenix_program_id",
            "type": "pubkey"
          },
          {
            "name": "phoenix_log_authority",
            "type": "pubkey"
          },
          {
            "name": "phoenix_market",
            "type": "pubkey"
          },
          {
            "name": "phoenix_base_vault",
            "type": "pubkey"
          },
          {
            "name": "phoenix_quote_vault",
            "type": "pubkey"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "fulfillment_type",
            "type": {
              "defined": {
                "name": "SpotFulfillmentType"
              }
            }
          },
          {
            "name": "status",
            "type": {
              "defined": {
                "name": "SpotFulfillmentConfigStatus"
              }
            }
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                4
              ]
            }
          }
        ]
      }
    },
    {
      "name": "PoolBalance",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "scaled_balance",
            "docs": [
              "To get the pool's token amount, you must multiply the scaled balance by the market's cumulative",
              "deposit interest",
              "precision: SPOT_BALANCE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "market_index",
            "docs": [
              "The spot market the pool is for"
            ],
            "type": "u16"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                14
              ]
            }
          }
        ]
      }
    },
    {
      "name": "PositionDirection",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Long"
          },
          {
            "name": "Short"
          }
        ]
      }
    },
    {
      "name": "PostOnlyParam",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "None"
          },
          {
            "name": "MustPostOnly"
          },
          {
            "name": "TryPostOnly"
          },
          {
            "name": "Slide"
          }
        ]
      }
    },
    {
      "name": "PrelaunchOracle",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "price",
            "type": "i64"
          },
          {
            "name": "max_price",
            "type": "i64"
          },
          {
            "name": "confidence",
            "type": "u64"
          },
          {
            "name": "last_update_slot",
            "type": "u64"
          },
          {
            "name": "amm_last_update_slot",
            "type": "u64"
          },
          {
            "name": "perp_market_index",
            "type": "u16"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                70
              ]
            }
          }
        ]
      }
    },
    {
      "name": "PrelaunchOracleParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "perp_market_index",
            "type": "u16"
          },
          {
            "name": "price",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "max_price",
            "type": {
              "option": "i64"
            }
          }
        ]
      }
    },
    {
      "name": "PriceDivergenceGuardRails",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mark_oracle_percent_divergence",
            "type": "u64"
          },
          {
            "name": "oracle_twap_5min_percent_divergence",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "ProtectedMakerModeConfig",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "max_users",
            "type": "u32"
          },
          {
            "name": "current_users",
            "type": "u32"
          },
          {
            "name": "reduce_only",
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                31
              ]
            }
          }
        ]
      }
    },
    {
      "name": "PythLazerOracle",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "price",
            "type": "i64"
          },
          {
            "name": "publish_time",
            "type": "u64"
          },
          {
            "name": "posted_slot",
            "type": "u64"
          },
          {
            "name": "exponent",
            "type": "i32"
          },
          {
            "name": "_padding",
            "type": {
              "array": [
                "u8",
                4
              ]
            }
          },
          {
            "name": "conf",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "ReferrerName",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "user_stats",
            "type": "pubkey"
          },
          {
            "name": "name",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          }
        ]
      }
    },
    {
      "name": "RevenueShare",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "docs": [
              "the owner of this account, a builder or referrer"
            ],
            "type": "pubkey"
          },
          {
            "name": "total_referrer_rewards",
            "type": "u64"
          },
          {
            "name": "total_builder_rewards",
            "type": "u64"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                24
              ]
            }
          }
        ]
      }
    },
    {
      "name": "RevenueShareEscrow",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "docs": [
              "the owner of this account, a user"
            ],
            "type": "pubkey"
          },
          {
            "name": "referrer",
            "type": "pubkey"
          },
          {
            "name": "referrer_boost_expire_ts",
            "type": "u32"
          },
          {
            "name": "referrer_reward_offset",
            "type": "i8"
          },
          {
            "name": "referee_fee_numerator_offset",
            "type": "i8"
          },
          {
            "name": "referrer_boost_numerator",
            "type": "i8"
          },
          {
            "name": "reserved_fixed",
            "type": {
              "array": [
                "u8",
                17
              ]
            }
          },
          {
            "name": "padding0",
            "type": "u32"
          },
          {
            "name": "orders",
            "type": {
              "vec": {
                "defined": {
                  "name": "RevenueShareOrder"
                }
              }
            }
          },
          {
            "name": "padding1",
            "type": "u32"
          },
          {
            "name": "approved_builders",
            "type": {
              "vec": {
                "defined": {
                  "name": "BuilderInfo"
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "RevenueShareOrder",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "fees_accrued",
            "docs": [
              "fees accrued so far for this order slot. This is not exclusively fees from this order_id",
              "and may include fees from other orders in the same market. This may be swept to the",
              "builder's SpotPosition during settle_pnl."
            ],
            "type": "u64"
          },
          {
            "name": "order_id",
            "docs": [
              "the order_id of the current active order in this slot. It's only relevant while bit_flag = Open"
            ],
            "type": "u32"
          },
          {
            "name": "fee_tenth_bps",
            "docs": [
              "the builder fee on this order, in tenths of a bps, e.g. 100 = 0.01%"
            ],
            "type": "u16"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "sub_account_id",
            "docs": [
              "the subaccount_id of the user who created this order. It's only relevant while bit_flag = Open"
            ],
            "type": "u16"
          },
          {
            "name": "builder_idx",
            "docs": [
              "the index of the RevenueShareEscrow.approved_builders list, that this order's fee will settle to. Ignored",
              "if bit_flag = Referral."
            ],
            "type": "u8"
          },
          {
            "name": "bit_flags",
            "docs": [
              "bitflags that describe the state of the order.",
              "[`RevenueShareOrderBitFlag::Init`]: this order slot is available for use.",
              "[`RevenueShareOrderBitFlag::Open`]: this order slot is occupied, `order_id` is the `sub_account_id`'s active order.",
              "[`RevenueShareOrderBitFlag::Completed`]: this order has been filled or canceled, and is waiting to be settled into.",
              "the builder's account order_id and sub_account_id are no longer relevant, it may be merged with other orders.",
              "[`RevenueShareOrderBitFlag::Referral`]: this order stores referral rewards waiting to be settled for this market.",
              "If it is set, no other bitflag should be set."
            ],
            "type": "u8"
          },
          {
            "name": "user_order_index",
            "docs": [
              "the index into the User's orders list when this RevenueShareOrder was created, make sure to verify that order_id matches."
            ],
            "type": "u8"
          },
          {
            "name": "market_type",
            "type": {
              "defined": {
                "name": "MarketType"
              }
            }
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                10
              ]
            }
          }
        ]
      }
    },
    {
      "name": "RevenueShareSettleRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "builder",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "referrer",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "fee_settled",
            "type": "u64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "market_type",
            "type": {
              "defined": {
                "name": "MarketType"
              }
            }
          },
          {
            "name": "builder_sub_account_id",
            "type": "u16"
          },
          {
            "name": "builder_total_referrer_rewards",
            "type": "u64"
          },
          {
            "name": "builder_total_builder_rewards",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "ScaleOrderParams",
      "docs": [
        "Parameters for placing scale orders - multiple limit orders distributed across a price range"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "market_type",
            "type": {
              "defined": {
                "name": "MarketType"
              }
            }
          },
          {
            "name": "direction",
            "type": {
              "defined": {
                "name": "PositionDirection"
              }
            }
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "total_base_asset_amount",
            "docs": [
              "Total base asset amount to distribute across all orders"
            ],
            "type": "u64"
          },
          {
            "name": "start_price",
            "docs": [
              "Starting price for the scale (in PRICE_PRECISION)"
            ],
            "type": "u64"
          },
          {
            "name": "end_price",
            "docs": [
              "Ending price for the scale (in PRICE_PRECISION)"
            ],
            "type": "u64"
          },
          {
            "name": "order_count",
            "docs": [
              "Number of orders to place (min 2, max 32)"
            ],
            "type": "u8"
          },
          {
            "name": "size_distribution",
            "docs": [
              "How to distribute sizes across orders"
            ],
            "type": {
              "defined": {
                "name": "SizeDistribution"
              }
            }
          },
          {
            "name": "reduce_only",
            "docs": [
              "Whether orders should be reduce-only"
            ],
            "type": "bool"
          },
          {
            "name": "post_only",
            "docs": [
              "Post-only setting for all orders"
            ],
            "type": {
              "defined": {
                "name": "PostOnlyParam"
              }
            }
          },
          {
            "name": "bit_flags",
            "docs": [
              "Bit flags (e.g., for high leverage mode)"
            ],
            "type": "u8"
          },
          {
            "name": "max_ts",
            "docs": [
              "Maximum timestamp for orders to be valid"
            ],
            "type": {
              "option": "i64"
            }
          }
        ]
      }
    },
    {
      "name": "SerumV3FulfillmentConfig",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pubkey",
            "type": "pubkey"
          },
          {
            "name": "serum_program_id",
            "type": "pubkey"
          },
          {
            "name": "serum_market",
            "type": "pubkey"
          },
          {
            "name": "serum_request_queue",
            "type": "pubkey"
          },
          {
            "name": "serum_event_queue",
            "type": "pubkey"
          },
          {
            "name": "serum_bids",
            "type": "pubkey"
          },
          {
            "name": "serum_asks",
            "type": "pubkey"
          },
          {
            "name": "serum_base_vault",
            "type": "pubkey"
          },
          {
            "name": "serum_quote_vault",
            "type": "pubkey"
          },
          {
            "name": "serum_open_orders",
            "type": "pubkey"
          },
          {
            "name": "serum_signer_nonce",
            "type": "u64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "fulfillment_type",
            "type": {
              "defined": {
                "name": "SpotFulfillmentType"
              }
            }
          },
          {
            "name": "status",
            "type": {
              "defined": {
                "name": "SpotFulfillmentConfigStatus"
              }
            }
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                4
              ]
            }
          }
        ]
      }
    },
    {
      "name": "SettlePnlExplanation",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "None"
          },
          {
            "name": "ExpiredPosition"
          }
        ]
      }
    },
    {
      "name": "SettlePnlMode",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "MustSettle"
          },
          {
            "name": "TrySettle"
          }
        ]
      }
    },
    {
      "name": "SettlePnlRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "pnl",
            "type": "i128"
          },
          {
            "name": "base_asset_amount",
            "type": "i64"
          },
          {
            "name": "quote_asset_amount_after",
            "type": "i64"
          },
          {
            "name": "quote_entry_amount",
            "type": "i64"
          },
          {
            "name": "settle_price",
            "type": "i64"
          },
          {
            "name": "explanation",
            "type": {
              "defined": {
                "name": "SettlePnlExplanation"
              }
            }
          }
        ]
      }
    },
    {
      "name": "SignedMsgOrderId",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "uuid",
            "type": {
              "array": [
                "u8",
                8
              ]
            }
          },
          {
            "name": "max_slot",
            "type": "u64"
          },
          {
            "name": "order_id",
            "type": "u32"
          },
          {
            "name": "padding",
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "SignedMsgOrderParamsDelegateMessage",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "signed_msg_order_params",
            "type": {
              "defined": {
                "name": "OrderParams"
              }
            }
          },
          {
            "name": "taker_pubkey",
            "type": "pubkey"
          },
          {
            "name": "slot",
            "type": "u64"
          },
          {
            "name": "uuid",
            "type": {
              "array": [
                "u8",
                8
              ]
            }
          },
          {
            "name": "take_profit_order_params",
            "type": {
              "option": {
                "defined": {
                  "name": "SignedMsgTriggerOrderParams"
                }
              }
            }
          },
          {
            "name": "stop_loss_order_params",
            "type": {
              "option": {
                "defined": {
                  "name": "SignedMsgTriggerOrderParams"
                }
              }
            }
          },
          {
            "name": "max_margin_ratio",
            "type": {
              "option": "u16"
            }
          },
          {
            "name": "builder_idx",
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "builder_fee_tenth_bps",
            "type": {
              "option": "u16"
            }
          },
          {
            "name": "isolated_position_deposit",
            "type": {
              "option": "u64"
            }
          }
        ]
      }
    },
    {
      "name": "SignedMsgOrderParamsMessage",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "signed_msg_order_params",
            "type": {
              "defined": {
                "name": "OrderParams"
              }
            }
          },
          {
            "name": "sub_account_id",
            "type": "u16"
          },
          {
            "name": "slot",
            "type": "u64"
          },
          {
            "name": "uuid",
            "type": {
              "array": [
                "u8",
                8
              ]
            }
          },
          {
            "name": "take_profit_order_params",
            "type": {
              "option": {
                "defined": {
                  "name": "SignedMsgTriggerOrderParams"
                }
              }
            }
          },
          {
            "name": "stop_loss_order_params",
            "type": {
              "option": {
                "defined": {
                  "name": "SignedMsgTriggerOrderParams"
                }
              }
            }
          },
          {
            "name": "max_margin_ratio",
            "type": {
              "option": "u16"
            }
          },
          {
            "name": "builder_idx",
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "builder_fee_tenth_bps",
            "type": {
              "option": "u16"
            }
          },
          {
            "name": "isolated_position_deposit",
            "type": {
              "option": "u64"
            }
          }
        ]
      }
    },
    {
      "name": "SignedMsgOrderRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "hash",
            "type": "string"
          },
          {
            "name": "matching_order_params",
            "type": {
              "defined": {
                "name": "OrderParams"
              }
            }
          },
          {
            "name": "user_order_id",
            "type": "u32"
          },
          {
            "name": "signed_msg_order_max_slot",
            "type": "u64"
          },
          {
            "name": "signed_msg_order_uuid",
            "type": {
              "array": [
                "u8",
                8
              ]
            }
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "SignedMsgTriggerOrderParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "trigger_price",
            "type": "u64"
          },
          {
            "name": "base_asset_amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "SignedMsgUserOrders",
      "docs": [
        "* This struct is a duplicate of SignedMsgUserOrdersZeroCopy\n * It is used to give anchor an struct to generate the idl for clients\n * The struct SignedMsgUserOrdersZeroCopy is used to load the data in efficiently"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority_pubkey",
            "type": "pubkey"
          },
          {
            "name": "padding",
            "type": "u32"
          },
          {
            "name": "signed_msg_order_data",
            "type": {
              "vec": {
                "defined": {
                  "name": "SignedMsgOrderId"
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "SignedMsgWsDelegates",
      "docs": [
        "* Used to store authenticated delegates for swift-like ws connections"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "delegates",
            "type": {
              "vec": "pubkey"
            }
          }
        ]
      }
    },
    {
      "name": "SizeDistribution",
      "docs": [
        "How to distribute order sizes across scale orders"
      ],
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Flat"
          },
          {
            "name": "Ascending"
          },
          {
            "name": "Descending"
          }
        ]
      }
    },
    {
      "name": "SpotBalanceType",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Deposit"
          },
          {
            "name": "Borrow"
          }
        ]
      }
    },
    {
      "name": "SpotBankruptcyRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "borrow_amount",
            "type": "u128"
          },
          {
            "name": "if_payment",
            "type": "u128"
          },
          {
            "name": "cumulative_deposit_interest_delta",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "SpotFulfillmentConfigStatus",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Enabled"
          },
          {
            "name": "Disabled"
          }
        ]
      }
    },
    {
      "name": "SpotFulfillmentType",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "SerumV3"
          },
          {
            "name": "Match"
          },
          {
            "name": "PhoenixV1"
          },
          {
            "name": "OpenbookV2"
          }
        ]
      }
    },
    {
      "name": "SpotInterestRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "deposit_balance",
            "docs": [
              "precision: SPOT_BALANCE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "cumulative_deposit_interest",
            "docs": [
              "precision: SPOT_CUMULATIVE_INTEREST_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "borrow_balance",
            "docs": [
              "precision: SPOT_BALANCE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "cumulative_borrow_interest",
            "docs": [
              "precision: SPOT_CUMULATIVE_INTEREST_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "optimal_utilization",
            "docs": [
              "precision: PERCENTAGE_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "optimal_borrow_rate",
            "docs": [
              "precision: PERCENTAGE_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "max_borrow_rate",
            "docs": [
              "precision: PERCENTAGE_PRECISION"
            ],
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "SpotMarket",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pubkey",
            "docs": [
              "The address of the spot market. It is a pda of the market index"
            ],
            "type": "pubkey"
          },
          {
            "name": "oracle",
            "docs": [
              "The oracle used to price the markets deposits/borrows"
            ],
            "type": "pubkey"
          },
          {
            "name": "mint",
            "docs": [
              "The token mint of the market"
            ],
            "type": "pubkey"
          },
          {
            "name": "vault",
            "docs": [
              "The vault used to store the market's deposits",
              "The amount in the vault should be equal to or greater than deposits - borrows"
            ],
            "type": "pubkey"
          },
          {
            "name": "name",
            "docs": [
              "The encoded display name for the market e.g. SOL"
            ],
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "insurance_fund",
            "docs": [
              "Details on the insurance fund covering bankruptcies in this markets token",
              "Covers bankruptcies for borrows with this markets token and perps settling in this markets token"
            ],
            "type": {
              "defined": {
                "name": "InsuranceFund"
              }
            }
          },
          {
            "name": "total_spot_fee",
            "docs": [
              "The total spot fees collected for this market",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "deposit_balance",
            "docs": [
              "The sum of the scaled balances for deposits across users and pool balances",
              "To convert to the deposit token amount, multiply by the cumulative deposit interest",
              "precision: SPOT_BALANCE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "borrow_balance",
            "docs": [
              "The sum of the scaled balances for borrows across users and pool balances",
              "To convert to the borrow token amount, multiply by the cumulative borrow interest",
              "precision: SPOT_BALANCE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "cumulative_deposit_interest",
            "docs": [
              "The cumulative interest earned by depositors",
              "Used to calculate the deposit token amount from the deposit balance",
              "precision: SPOT_CUMULATIVE_INTEREST_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "cumulative_borrow_interest",
            "docs": [
              "The cumulative interest earned by borrowers",
              "Used to calculate the borrow token amount from the borrow balance",
              "precision: SPOT_CUMULATIVE_INTEREST_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "total_social_loss",
            "docs": [
              "The total socialized loss from borrows, in the mint's token",
              "precision: token mint precision"
            ],
            "type": "u128"
          },
          {
            "name": "total_quote_social_loss",
            "docs": [
              "The total socialized loss from borrows, in the quote market's token",
              "preicision: QUOTE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "revenue_pool",
            "docs": [
              "Revenue the protocol has collected in this markets token",
              "e.g. for SOL-PERP, funds can be settled in usdc and will flow into the USDC revenue pool"
            ],
            "type": {
              "defined": {
                "name": "PoolBalance"
              }
            }
          },
          {
            "name": "spot_fee_pool",
            "docs": [
              "The fees collected from swaps between this market and the quote market",
              "Is settled to the quote markets revenue pool"
            ],
            "type": {
              "defined": {
                "name": "PoolBalance"
              }
            }
          },
          {
            "name": "historical_oracle_data",
            "type": {
              "defined": {
                "name": "HistoricalOracleData"
              }
            }
          },
          {
            "name": "historical_index_data",
            "type": {
              "defined": {
                "name": "HistoricalIndexData"
              }
            }
          },
          {
            "name": "withdraw_guard_threshold",
            "docs": [
              "no withdraw limits/guards when deposits below this threshold",
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "max_token_deposits",
            "docs": [
              "The max amount of token deposits in this market",
              "0 if there is no limit",
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "deposit_token_twap",
            "docs": [
              "24hr average of deposit token amount",
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "borrow_token_twap",
            "docs": [
              "24hr average of borrow token amount",
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "utilization_twap",
            "docs": [
              "24hr average of utilization",
              "which is borrow amount over token amount",
              "precision: SPOT_UTILIZATION_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_interest_ts",
            "docs": [
              "Last time the cumulative deposit and borrow interest was updated"
            ],
            "type": "u64"
          },
          {
            "name": "last_twap_ts",
            "docs": [
              "Last time the deposit/borrow/utilization averages were updated"
            ],
            "type": "u64"
          },
          {
            "name": "expiry_ts",
            "docs": [
              "The time the market is set to expire. Only set if market is in reduce only mode"
            ],
            "type": "i64"
          },
          {
            "name": "order_step_size",
            "docs": [
              "Spot orders must be a multiple of the step size",
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "order_tick_size",
            "docs": [
              "Spot orders must be a multiple of the tick size",
              "precision: PRICE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "min_order_size",
            "docs": [
              "The minimum order size",
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "max_position_size",
            "docs": [
              "The maximum spot position size",
              "if the limit is 0, there is no limit",
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "next_fill_record_id",
            "docs": [
              "Every spot trade has a fill record id. This is the next id to use"
            ],
            "type": "u64"
          },
          {
            "name": "next_deposit_record_id",
            "docs": [
              "Every deposit has a deposit record id. This is the next id to use"
            ],
            "type": "u64"
          },
          {
            "name": "initial_asset_weight",
            "docs": [
              "The initial asset weight used to calculate a deposits contribution to a users initial total collateral",
              "e.g. if the asset weight is .8, $100 of deposits contributes $80 to the users initial total collateral",
              "precision: SPOT_WEIGHT_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "maintenance_asset_weight",
            "docs": [
              "The maintenance asset weight used to calculate a deposits contribution to a users maintenance total collateral",
              "e.g. if the asset weight is .9, $100 of deposits contributes $90 to the users maintenance total collateral",
              "precision: SPOT_WEIGHT_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "initial_liability_weight",
            "docs": [
              "The initial liability weight used to calculate a borrows contribution to a users initial margin requirement",
              "e.g. if the liability weight is .9, $100 of borrows contributes $90 to the users initial margin requirement",
              "precision: SPOT_WEIGHT_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "maintenance_liability_weight",
            "docs": [
              "The maintenance liability weight used to calculate a borrows contribution to a users maintenance margin requirement",
              "e.g. if the liability weight is .8, $100 of borrows contributes $80 to the users maintenance margin requirement",
              "precision: SPOT_WEIGHT_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "imf_factor",
            "docs": [
              "The initial margin fraction factor. Used to increase liability weight/decrease asset weight for large positions",
              "precision: MARGIN_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "liquidator_fee",
            "docs": [
              "The fee the liquidator is paid for taking over borrow/deposit",
              "precision: LIQUIDATOR_FEE_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "if_liquidation_fee",
            "docs": [
              "The fee the insurance fund receives from liquidation",
              "precision: LIQUIDATOR_FEE_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "optimal_utilization",
            "docs": [
              "The optimal utilization rate for this market.",
              "Used to determine the markets borrow rate",
              "precision: SPOT_UTILIZATION_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "optimal_borrow_rate",
            "docs": [
              "The borrow rate for this market when the market has optimal utilization",
              "precision: SPOT_RATE_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "max_borrow_rate",
            "docs": [
              "The borrow rate for this market when the market has 1000 utilization",
              "precision: SPOT_RATE_PRECISION"
            ],
            "type": "u32"
          },
          {
            "name": "decimals",
            "docs": [
              "The market's token mint's decimals. To from decimals to a precision, 10^decimals"
            ],
            "type": "u32"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "orders_enabled",
            "docs": [
              "Whether or not spot trading is enabled"
            ],
            "type": "bool"
          },
          {
            "name": "oracle_source",
            "type": {
              "defined": {
                "name": "OracleSource"
              }
            }
          },
          {
            "name": "status",
            "type": {
              "defined": {
                "name": "MarketStatus"
              }
            }
          },
          {
            "name": "asset_tier",
            "docs": [
              "The asset tier affects how a deposit can be used as collateral and the priority for a borrow being liquidated"
            ],
            "type": {
              "defined": {
                "name": "AssetTier"
              }
            }
          },
          {
            "name": "paused_operations",
            "type": "u8"
          },
          {
            "name": "if_paused_operations",
            "type": "u8"
          },
          {
            "name": "fee_adjustment",
            "type": "i16"
          },
          {
            "name": "max_token_borrows_fraction",
            "docs": [
              "What fraction of max_token_deposits",
              "disabled when 0, 1 => 1/10000 => .01% of max_token_deposits",
              "precision: X/10000"
            ],
            "type": "u16"
          },
          {
            "name": "flash_loan_amount",
            "docs": [
              "For swaps, the amount of token loaned out in the begin_swap ix",
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "flash_loan_initial_token_amount",
            "docs": [
              "For swaps, the amount in the users token account in the begin_swap ix",
              "Used to calculate how much of the token left the system in end_swap ix",
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "total_swap_fee",
            "docs": [
              "The total fees received from swaps",
              "precision: token mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "scale_initial_asset_weight_start",
            "docs": [
              "When to begin scaling down the initial asset weight",
              "disabled when 0",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "min_borrow_rate",
            "docs": [
              "The min borrow rate for this market when the market regardless of utilization",
              "1 => 1/200 => .5%",
              "precision: X/200"
            ],
            "type": "u8"
          },
          {
            "name": "fuel_boost_deposits",
            "docs": [
              "fuel multiplier for spot deposits",
              "precision: 10"
            ],
            "type": "u8"
          },
          {
            "name": "fuel_boost_borrows",
            "docs": [
              "fuel multiplier for spot borrows",
              "precision: 10"
            ],
            "type": "u8"
          },
          {
            "name": "fuel_boost_taker",
            "docs": [
              "fuel multiplier for spot taker",
              "precision: 10"
            ],
            "type": "u8"
          },
          {
            "name": "fuel_boost_maker",
            "docs": [
              "fuel multiplier for spot maker",
              "precision: 10"
            ],
            "type": "u8"
          },
          {
            "name": "fuel_boost_insurance",
            "docs": [
              "fuel multiplier for spot insurance stake",
              "precision: 10"
            ],
            "type": "u8"
          },
          {
            "name": "token_program_flag",
            "type": "u8"
          },
          {
            "name": "pool_id",
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                56
              ]
            }
          }
        ]
      }
    },
    {
      "name": "SpotMarketVaultDepositRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "deposit_balance",
            "docs": [
              "precision: SPOT_BALANCE_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "cumulative_deposit_interest_before",
            "docs": [
              "precision: SPOT_CUMULATIVE_INTEREST_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "cumulative_deposit_interest_after",
            "docs": [
              "precision: SPOT_CUMULATIVE_INTEREST_PRECISION"
            ],
            "type": "u128"
          },
          {
            "name": "deposit_token_amount_before",
            "type": "u64"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "SpotPosition",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "scaled_balance",
            "docs": [
              "The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow",
              "interest of corresponding market.",
              "precision: SPOT_BALANCE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "open_bids",
            "docs": [
              "How many spot non reduce only trigger orders the user has open",
              "precision: token mint precision"
            ],
            "type": "i64"
          },
          {
            "name": "open_asks",
            "docs": [
              "How many spot non reduce only trigger orders the user has open",
              "precision: token mint precision"
            ],
            "type": "i64"
          },
          {
            "name": "cumulative_deposits",
            "docs": [
              "The cumulative deposits/borrows a user has made into a market",
              "precision: token mint precision"
            ],
            "type": "i64"
          },
          {
            "name": "market_index",
            "docs": [
              "The market index of the corresponding spot market"
            ],
            "type": "u16"
          },
          {
            "name": "balance_type",
            "docs": [
              "Whether the position is deposit or borrow"
            ],
            "type": {
              "defined": {
                "name": "SpotBalanceType"
              }
            }
          },
          {
            "name": "open_orders",
            "docs": [
              "Number of open orders"
            ],
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                4
              ]
            }
          }
        ]
      }
    },
    {
      "name": "StakeAction",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Stake"
          },
          {
            "name": "UnstakeRequest"
          },
          {
            "name": "UnstakeCancelRequest"
          },
          {
            "name": "Unstake"
          },
          {
            "name": "UnstakeTransfer"
          },
          {
            "name": "StakeTransfer"
          },
          {
            "name": "AdminDeposit"
          }
        ]
      }
    },
    {
      "name": "State",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "whitelist_mint",
            "type": "pubkey"
          },
          {
            "name": "discount_mint",
            "type": "pubkey"
          },
          {
            "name": "signer",
            "type": "pubkey"
          },
          {
            "name": "srm_vault",
            "type": "pubkey"
          },
          {
            "name": "perp_fee_structure",
            "type": {
              "defined": {
                "name": "FeeStructure"
              }
            }
          },
          {
            "name": "spot_fee_structure",
            "type": {
              "defined": {
                "name": "FeeStructure"
              }
            }
          },
          {
            "name": "oracle_guard_rails",
            "type": {
              "defined": {
                "name": "OracleGuardRails"
              }
            }
          },
          {
            "name": "number_of_authorities",
            "type": "u64"
          },
          {
            "name": "number_of_sub_accounts",
            "type": "u64"
          },
          {
            "name": "lp_cooldown_time",
            "type": "u64"
          },
          {
            "name": "liquidation_margin_buffer_ratio",
            "type": "u32"
          },
          {
            "name": "settlement_duration",
            "type": "u16"
          },
          {
            "name": "number_of_markets",
            "type": "u16"
          },
          {
            "name": "number_of_spot_markets",
            "type": "u16"
          },
          {
            "name": "signer_nonce",
            "type": "u8"
          },
          {
            "name": "min_perp_auction_duration",
            "type": "u8"
          },
          {
            "name": "default_market_order_time_in_force",
            "type": "u8"
          },
          {
            "name": "default_spot_auction_duration",
            "type": "u8"
          },
          {
            "name": "exchange_status",
            "type": "u8"
          },
          {
            "name": "liquidation_duration",
            "type": "u8"
          },
          {
            "name": "initial_pct_to_liquidate",
            "type": "u16"
          },
          {
            "name": "max_number_of_sub_accounts",
            "type": "u16"
          },
          {
            "name": "max_initialize_user_fee",
            "type": "u16"
          },
          {
            "name": "feature_bit_flags",
            "type": "u8"
          },
          {
            "name": "lp_pool_feature_bit_flags",
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                8
              ]
            }
          }
        ]
      }
    },
    {
      "name": "SwapRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "amount_out",
            "docs": [
              "precision: out market mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "amount_in",
            "docs": [
              "precision: in market mint precision"
            ],
            "type": "u64"
          },
          {
            "name": "out_market_index",
            "type": "u16"
          },
          {
            "name": "in_market_index",
            "type": "u16"
          },
          {
            "name": "out_oracle_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "in_oracle_price",
            "docs": [
              "precision: PRICE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "fee",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "SwapReduceOnly",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "In"
          },
          {
            "name": "Out"
          }
        ]
      }
    },
    {
      "name": "TargetsDatum",
      "serialization": "bytemuck",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "cost_to_trade_bps",
            "type": "i32"
          },
          {
            "name": "_padding",
            "type": {
              "array": [
                "u8",
                4
              ]
            }
          },
          {
            "name": "target_base",
            "type": "i64"
          },
          {
            "name": "last_oracle_slot",
            "type": "u64"
          },
          {
            "name": "last_position_slot",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "TransferFeeAndPnlPoolDirection",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "FeeToPnlPool"
          },
          {
            "name": "PnlToFeePool"
          }
        ]
      }
    },
    {
      "name": "TransferFeeAndPnlPoolRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "slot",
            "type": "u64"
          },
          {
            "name": "perp_market_index_with_fee_pool",
            "type": "u16"
          },
          {
            "name": "perp_market_index_with_pnl_pool",
            "type": "u16"
          },
          {
            "name": "direction",
            "type": {
              "defined": {
                "name": "TransferFeeAndPnlPoolDirection"
              }
            }
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "TransferProtocolIfSharesToRevenuePoolRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ts",
            "type": "i64"
          },
          {
            "name": "market_index",
            "type": "u16"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "shares",
            "type": "u128"
          },
          {
            "name": "if_vault_amount_before",
            "type": "u64"
          },
          {
            "name": "protocol_shares_before",
            "type": "u128"
          },
          {
            "name": "transfer_amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "UpdatePerpMarketSummaryStatsParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "quote_asset_amount_with_unsettled_lp",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "net_unsettled_funding_pnl",
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "update_amm_summary_stats",
            "type": {
              "option": "bool"
            }
          },
          {
            "name": "exclude_total_liq_fee",
            "type": {
              "option": "bool"
            }
          }
        ]
      }
    },
    {
      "name": "User",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "docs": [
              "The owner/authority of the account"
            ],
            "type": "pubkey"
          },
          {
            "name": "delegate",
            "docs": [
              "An addresses that can control the account on the authority's behalf. Has limited power, cant withdraw"
            ],
            "type": "pubkey"
          },
          {
            "name": "name",
            "docs": [
              "Encoded display name e.g. \"toly\""
            ],
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "spot_positions",
            "docs": [
              "The user's spot positions"
            ],
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "SpotPosition"
                  }
                },
                8
              ]
            }
          },
          {
            "name": "perp_positions",
            "docs": [
              "The user's perp positions"
            ],
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "PerpPosition"
                  }
                },
                8
              ]
            }
          },
          {
            "name": "orders",
            "docs": [
              "The user's orders"
            ],
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "Order"
                  }
                },
                32
              ]
            }
          },
          {
            "name": "last_add_perp_lp_shares_ts",
            "docs": [
              "The last time the user added perp lp positions"
            ],
            "type": "i64"
          },
          {
            "name": "total_deposits",
            "docs": [
              "The total values of deposits the user has made",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "total_withdraws",
            "docs": [
              "The total values of withdrawals the user has made",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "total_social_loss",
            "docs": [
              "The total socialized loss the users has incurred upon the protocol",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "settled_perp_pnl",
            "docs": [
              "Fees (taker fees, maker rebate, referrer reward, filler reward) and pnl for perps",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "cumulative_spot_fees",
            "docs": [
              "Fees (taker fees, maker rebate, filler reward) for spot",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "cumulative_perp_funding",
            "docs": [
              "Cumulative funding paid/received for perps",
              "precision: QUOTE_PRECISION"
            ],
            "type": "i64"
          },
          {
            "name": "liquidation_margin_freed",
            "docs": [
              "The amount of margin freed during liquidation. Used to force the liquidation to occur over a period of time",
              "Defaults to zero when not being liquidated",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_active_slot",
            "docs": [
              "The last slot a user was active. Used to determine if a user is idle"
            ],
            "type": "u64"
          },
          {
            "name": "next_order_id",
            "docs": [
              "Every user order has an order id. This is the next order id to be used"
            ],
            "type": "u32"
          },
          {
            "name": "max_margin_ratio",
            "docs": [
              "Custom max initial margin ratio for the user"
            ],
            "type": "u32"
          },
          {
            "name": "next_liquidation_id",
            "docs": [
              "The next liquidation id to be used for user"
            ],
            "type": "u16"
          },
          {
            "name": "sub_account_id",
            "docs": [
              "The sub account id for this user"
            ],
            "type": "u16"
          },
          {
            "name": "status",
            "docs": [
              "Whether the user is active, being liquidated or bankrupt"
            ],
            "type": "u8"
          },
          {
            "name": "is_margin_trading_enabled",
            "docs": [
              "Whether the user has enabled margin trading"
            ],
            "type": "bool"
          },
          {
            "name": "idle",
            "docs": [
              "User is idle if they haven't interacted with the protocol in 1 week and they have no orders, perp positions or borrows",
              "Off-chain keeper bots can ignore users that are idle"
            ],
            "type": "bool"
          },
          {
            "name": "open_orders",
            "docs": [
              "number of open orders"
            ],
            "type": "u8"
          },
          {
            "name": "has_open_order",
            "docs": [
              "Whether or not user has open order"
            ],
            "type": "bool"
          },
          {
            "name": "open_auctions",
            "docs": [
              "number of open orders with auction"
            ],
            "type": "u8"
          },
          {
            "name": "has_open_auction",
            "docs": [
              "Whether or not user has open order with auction"
            ],
            "type": "bool"
          },
          {
            "name": "padding_former_margin_mode",
            "type": "u8"
          },
          {
            "name": "pool_id",
            "type": "u8"
          },
          {
            "name": "padding1",
            "type": {
              "array": [
                "u8",
                3
              ]
            }
          },
          {
            "name": "last_fuel_bonus_update_ts",
            "type": "u32"
          },
          {
            "name": "special_user_status",
            "docs": [
              "Whether the user is a special user (vamm hedger, etc)"
            ],
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                11
              ]
            }
          }
        ]
      }
    },
    {
      "name": "UserFees",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "total_fee_paid",
            "docs": [
              "Total taker fee paid",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "total_fee_rebate",
            "docs": [
              "Total maker fee rebate",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "total_token_discount",
            "docs": [
              "Total discount from holding token",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "total_referee_discount",
            "docs": [
              "Total discount from being referred",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "total_referrer_reward",
            "docs": [
              "Total reward to referrer",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "current_epoch_referrer_reward",
            "docs": [
              "Total reward to referrer this epoch",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "UserStats",
      "serialization": "bytemuckunsafe",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "docs": [
              "The authority for all of a users sub accounts"
            ],
            "type": "pubkey"
          },
          {
            "name": "referrer",
            "docs": [
              "The address that referred this user"
            ],
            "type": "pubkey"
          },
          {
            "name": "fees",
            "docs": [
              "Stats on the fees paid by the user"
            ],
            "type": {
              "defined": {
                "name": "UserFees"
              }
            }
          },
          {
            "name": "next_epoch_ts",
            "docs": [
              "The timestamp of the next epoch",
              "Epoch is used to limit referrer rewards earned in single epoch"
            ],
            "type": "i64"
          },
          {
            "name": "maker_volume_30d",
            "docs": [
              "Rolling 30day maker volume for user",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "taker_volume_30d",
            "docs": [
              "Rolling 30day taker volume for user",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "filler_volume_30d",
            "docs": [
              "Rolling 30day filler volume for user",
              "precision: QUOTE_PRECISION"
            ],
            "type": "u64"
          },
          {
            "name": "last_maker_volume_30d_ts",
            "docs": [
              "last time the maker volume was updated"
            ],
            "type": "i64"
          },
          {
            "name": "last_taker_volume_30d_ts",
            "docs": [
              "last time the taker volume was updated"
            ],
            "type": "i64"
          },
          {
            "name": "last_filler_volume_30d_ts",
            "docs": [
              "last time the filler volume was updated"
            ],
            "type": "i64"
          },
          {
            "name": "if_staked_quote_asset_amount",
            "docs": [
              "The amount of tokens staked in the quote spot markets if"
            ],
            "type": "u64"
          },
          {
            "name": "number_of_sub_accounts",
            "docs": [
              "The current number of sub accounts"
            ],
            "type": "u16"
          },
          {
            "name": "number_of_sub_accounts_created",
            "docs": [
              "The number of sub accounts created. Can be greater than the number of sub accounts if user",
              "has deleted sub accounts"
            ],
            "type": "u16"
          },
          {
            "name": "referrer_status",
            "docs": [
              "Flags for referrer status:",
              "First bit (LSB): 1 if user is a referrer, 0 otherwise",
              "Second bit: 1 if user was referred, 0 otherwise"
            ],
            "type": "u8"
          },
          {
            "name": "disable_update_perp_bid_ask_twap",
            "type": "u8"
          },
          {
            "name": "paused_operations",
            "type": "u8"
          },
          {
            "name": "fuel_overflow_status",
            "docs": [
              "whether the user has a FuelOverflow account"
            ],
            "type": "u8"
          },
          {
            "name": "fuel_insurance",
            "docs": [
              "accumulated fuel for token amounts of insurance"
            ],
            "type": "u32"
          },
          {
            "name": "fuel_deposits",
            "docs": [
              "accumulated fuel for notional of deposits"
            ],
            "type": "u32"
          },
          {
            "name": "fuel_borrows",
            "docs": [
              "accumulate fuel bonus for notional of borrows"
            ],
            "type": "u32"
          },
          {
            "name": "fuel_positions",
            "docs": [
              "accumulated fuel for perp open interest"
            ],
            "type": "u32"
          },
          {
            "name": "fuel_taker",
            "docs": [
              "accumulate fuel bonus for taker volume"
            ],
            "type": "u32"
          },
          {
            "name": "fuel_maker",
            "docs": [
              "accumulate fuel bonus for maker volume"
            ],
            "type": "u32"
          },
          {
            "name": "if_staked_gov_token_amount",
            "docs": [
              "The amount of tokens staked in the governance spot markets if"
            ],
            "type": "u64"
          },
          {
            "name": "last_fuel_if_bonus_update_ts",
            "docs": [
              "last unix ts user stats data was used to update if fuel (u32 to save space)"
            ],
            "type": "u32"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u8",
                12
              ]
            }
          }
        ]
      }
    },
    {
      "name": "ValidityGuardRails",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "slots_before_stale_for_amm",
            "type": "i64"
          },
          {
            "name": "slots_before_stale_for_margin",
            "type": "i64"
          },
          {
            "name": "confidence_interval_max_size",
            "type": "u64"
          },
          {
            "name": "too_volatile_ratio",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "_SignedMsgOrderParamsExport",
      "docs": [
        "unusued placeholder event to force include signed msg types into drift IDL"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "_a",
            "type": {
              "defined": {
                "name": "SignedMsgOrderParamsMessage"
              }
            }
          },
          {
            "name": "_b",
            "type": {
              "defined": {
                "name": "SignedMsgOrderParamsDelegateMessage"
              }
            }
          }
        ]
      }
    }
  ]
}