{
  "address": "pyti8TM4zRVBjmarcgAPmTNNAXYKJv7WVHrkrm6woLN",
  "metadata": {
    "name": "integrity_pool",
    "version": "1.0.0",
    "spec": "0.1.0",
    "description": "Created with Anchor"
  },
  "instructions": [
    {
      "name": "advance",
      "discriminator": [7, 56, 108, 201, 36, 20, 57, 89],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "pool_data",
          "writable": true,
          "relations": ["pool_config"]
        },
        {
          "name": "publisher_caps"
        },
        {
          "name": "pool_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "pool_reward_custody",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "pool_config"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206,
                  235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140,
                  245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "pool_config.pyth_token_mint",
                "account": "PoolConfig"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142,
                13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216,
                219, 233, 248, 89
              ]
            }
          }
        }
      ],
      "args": []
    },
    {
      "name": "advance_delegation_record",
      "discriminator": [155, 43, 226, 175, 227, 115, 33, 88],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "stake_account_positions"
        },
        {
          "name": "pool_data",
          "writable": true,
          "relations": ["pool_config"]
        },
        {
          "name": "pool_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "pool_reward_custody",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "pool_config"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206,
                  235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140,
                  245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "pool_config.pyth_token_mint",
                "account": "PoolConfig"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142,
                13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216,
                219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "stake_account_custody",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 115, 116, 111, 100, 121]
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ]
          }
        },
        {
          "name": "publisher",
          "docs": [
            "CHECK : The publisher will be checked against data in the pool_data"
          ]
        },
        {
          "name": "publisher_stake_account_positions",
          "optional": true
        },
        {
          "name": "publisher_stake_account_custody",
          "writable": true,
          "optional": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 115, 116, 111, 100, 121]
              },
              {
                "kind": "account",
                "path": "publisher_stake_account_positions"
              }
            ]
          }
        },
        {
          "name": "delegation_record",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  100, 101, 108, 101, 103, 97, 116, 105, 111, 110, 95, 114, 101,
                  99, 111, 114, 100
                ]
              },
              {
                "kind": "account",
                "path": "publisher"
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ]
          }
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [],
      "returns": "u64"
    },
    {
      "name": "create_slash_event",
      "discriminator": [7, 214, 12, 127, 239, 247, 253, 117],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "reward_program_authority",
          "signer": true,
          "relations": ["pool_config"]
        },
        {
          "name": "slash_custody",
          "relations": ["pool_config"]
        },
        {
          "name": "pool_data",
          "writable": true,
          "relations": ["pool_config"]
        },
        {
          "name": "pool_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "slash_event",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [115, 108, 97, 115, 104, 95, 101, 118, 101, 110, 116]
              },
              {
                "kind": "account",
                "path": "publisher"
              },
              {
                "kind": "arg",
                "path": "index"
              }
            ]
          }
        },
        {
          "name": "publisher",
          "docs": [
            "CHECK : The publisher will be checked against data in the pool_data"
          ]
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "index",
          "type": "u64"
        },
        {
          "name": "slash_ratio",
          "type": "u64"
        }
      ]
    },
    {
      "name": "delegate",
      "discriminator": [90, 147, 75, 178, 85, 88, 4, 137],
      "accounts": [
        {
          "name": "owner",
          "writable": true,
          "signer": true
        },
        {
          "name": "pool_data",
          "writable": true,
          "relations": ["pool_config"]
        },
        {
          "name": "pool_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "publisher",
          "docs": [
            "CHECK : The publisher will be checked against data in the pool_data"
          ]
        },
        {
          "name": "config_account",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ],
            "program": {
              "kind": "account",
              "path": "staking_program"
            }
          }
        },
        {
          "name": "stake_account_positions",
          "docs": [
            "CHECK : This AccountInfo is safe because it will checked in staking program"
          ],
          "writable": true
        },
        {
          "name": "stake_account_metadata",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115, 116, 97, 107, 101, 95, 109, 101, 116, 97, 100, 97, 116,
                  97
                ]
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ],
            "program": {
              "kind": "account",
              "path": "staking_program"
            }
          }
        },
        {
          "name": "stake_account_custody",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 115, 116, 111, 100, 121]
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ],
            "program": {
              "kind": "account",
              "path": "staking_program"
            }
          }
        },
        {
          "name": "staking_program",
          "address": "pytS9TjG1qyAZypk7n8rw8gfW9sUaqqYyMhJQ4E7JCQ"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "initialize_pool",
      "discriminator": [95, 180, 10, 172, 84, 174, 232, 40],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "config_account",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                12, 74, 158, 192, 43, 86, 104, 29, 164, 155, 4, 186, 155, 36,
                207, 137, 253, 128, 249, 44, 241, 145, 227, 125, 189, 51, 111,
                70, 231, 183, 19, 217
              ]
            }
          }
        },
        {
          "name": "pool_data",
          "writable": true
        },
        {
          "name": "pool_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "slash_custody"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "reward_program_authority",
          "type": "pubkey"
        },
        {
          "name": "y",
          "type": "u64"
        }
      ]
    },
    {
      "name": "merge_delegation_positions",
      "discriminator": [111, 59, 199, 177, 50, 231, 133, 228],
      "accounts": [
        {
          "name": "owner",
          "docs": [
            "CHECK : This instruction is permissionless, this account will be checked against",
            "stake_account_metadata in the CPI"
          ],
          "writable": true
        },
        {
          "name": "pool_data",
          "relations": ["pool_config"]
        },
        {
          "name": "pool_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "publisher",
          "docs": [
            "CHECK : The publisher will be checked against data in the pool_data"
          ]
        },
        {
          "name": "delegation_record",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  100, 101, 108, 101, 103, 97, 116, 105, 111, 110, 95, 114, 101,
                  99, 111, 114, 100
                ]
              },
              {
                "kind": "account",
                "path": "publisher"
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ]
          }
        },
        {
          "name": "config_account",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ],
            "program": {
              "kind": "account",
              "path": "staking_program"
            }
          }
        },
        {
          "name": "stake_account_positions",
          "docs": [
            "CHECK : This AccountInfo is safe because it will checked in staking program"
          ],
          "writable": true
        },
        {
          "name": "stake_account_metadata",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115, 116, 97, 107, 101, 95, 109, 101, 116, 97, 100, 97, 116,
                  97
                ]
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ],
            "program": {
              "kind": "account",
              "path": "staking_program"
            }
          }
        },
        {
          "name": "staking_program",
          "address": "pytS9TjG1qyAZypk7n8rw8gfW9sUaqqYyMhJQ4E7JCQ"
        }
      ],
      "args": []
    },
    {
      "name": "set_publisher_stake_account",
      "discriminator": [99, 46, 72, 132, 100, 235, 211, 117],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "publisher",
          "docs": [
            "CHECK : The publisher will be checked against data in the pool_data"
          ]
        },
        {
          "name": "pool_data",
          "writable": true,
          "relations": ["pool_config"]
        },
        {
          "name": "pool_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "new_stake_account_positions_option",
          "optional": true
        },
        {
          "name": "current_stake_account_positions_option",
          "optional": true
        }
      ],
      "args": []
    },
    {
      "name": "slash",
      "discriminator": [204, 141, 18, 161, 8, 177, 92, 142],
      "accounts": [
        {
          "name": "signer",
          "signer": true
        },
        {
          "name": "pool_data",
          "writable": true,
          "relations": ["pool_config"]
        },
        {
          "name": "pool_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "slash_event",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [115, 108, 97, 115, 104, 95, 101, 118, 101, 110, 116]
              },
              {
                "kind": "account",
                "path": "publisher"
              },
              {
                "kind": "arg",
                "path": "index"
              }
            ]
          }
        },
        {
          "name": "delegation_record",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  100, 101, 108, 101, 103, 97, 116, 105, 111, 110, 95, 114, 101,
                  99, 111, 114, 100
                ]
              },
              {
                "kind": "account",
                "path": "publisher"
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ]
          }
        },
        {
          "name": "publisher",
          "docs": [
            "CHECK : The publisher will be checked in the staking program"
          ]
        },
        {
          "name": "stake_account_positions",
          "writable": true
        },
        {
          "name": "stake_account_metadata",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115, 116, 97, 107, 101, 95, 109, 101, 116, 97, 100, 97, 116,
                  97
                ]
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                12, 74, 158, 192, 43, 86, 104, 29, 164, 155, 4, 186, 155, 36,
                207, 137, 253, 128, 249, 44, 241, 145, 227, 125, 189, 51, 111,
                70, 231, 183, 19, 217
              ]
            }
          }
        },
        {
          "name": "stake_account_custody",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 115, 116, 111, 100, 121]
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                12, 74, 158, 192, 43, 86, 104, 29, 164, 155, 4, 186, 155, 36,
                207, 137, 253, 128, 249, 44, 241, 145, 227, 125, 189, 51, 111,
                70, 231, 183, 19, 217
              ]
            }
          }
        },
        {
          "name": "config_account",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "governance_target_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [116, 97, 114, 103, 101, 116]
              },
              {
                "kind": "const",
                "value": [118, 111, 116, 105, 110, 103]
              }
            ]
          }
        },
        {
          "name": "slash_custody",
          "writable": true,
          "relations": ["slash_event"]
        },
        {
          "name": "custody_authority",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [97, 117, 116, 104, 111, 114, 105, 116, 121]
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ]
          }
        },
        {
          "name": "staking_program",
          "address": "pytS9TjG1qyAZypk7n8rw8gfW9sUaqqYyMhJQ4E7JCQ"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "index",
          "type": "u64"
        }
      ]
    },
    {
      "name": "undelegate",
      "discriminator": [131, 148, 180, 198, 91, 104, 42, 238],
      "accounts": [
        {
          "name": "owner",
          "writable": true,
          "signer": true
        },
        {
          "name": "pool_data",
          "writable": true,
          "relations": ["pool_config"]
        },
        {
          "name": "pool_config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "publisher",
          "docs": [
            "CHECK : The publisher will be checked against data in the pool_data"
          ]
        },
        {
          "name": "config_account",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ],
            "program": {
              "kind": "account",
              "path": "staking_program"
            }
          }
        },
        {
          "name": "stake_account_positions",
          "writable": true
        },
        {
          "name": "stake_account_metadata",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  115, 116, 97, 107, 101, 95, 109, 101, 116, 97, 100, 97, 116,
                  97
                ]
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ],
            "program": {
              "kind": "account",
              "path": "staking_program"
            }
          }
        },
        {
          "name": "stake_account_custody",
          "docs": [
            "CHECK : This AccountInfo is safe because it's a checked PDA"
          ],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 117, 115, 116, 111, 100, 121]
              },
              {
                "kind": "account",
                "path": "stake_account_positions"
              }
            ],
            "program": {
              "kind": "account",
              "path": "staking_program"
            }
          }
        },
        {
          "name": "staking_program",
          "address": "pytS9TjG1qyAZypk7n8rw8gfW9sUaqqYyMhJQ4E7JCQ"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "position_index",
          "type": "u8"
        },
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_delegation_fee",
      "discriminator": [197, 184, 73, 246, 24, 137, 184, 208],
      "accounts": [
        {
          "name": "reward_program_authority",
          "signer": true,
          "relations": ["pool_config"]
        },
        {
          "name": "pool_data",
          "writable": true,
          "relations": ["pool_config"]
        },
        {
          "name": "pool_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "delegation_fee",
          "type": "u64"
        }
      ]
    },
    {
      "name": "update_reward_program_authority",
      "discriminator": [105, 58, 166, 4, 99, 253, 115, 225],
      "accounts": [
        {
          "name": "reward_program_authority",
          "signer": true,
          "relations": ["pool_config"]
        },
        {
          "name": "pool_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "reward_program_authority",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "update_y",
      "discriminator": [224, 14, 232, 96, 41, 230, 183, 18],
      "accounts": [
        {
          "name": "reward_program_authority",
          "signer": true,
          "relations": ["pool_config"]
        },
        {
          "name": "pool_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "y",
          "type": "u64"
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "DelegationRecord",
      "discriminator": [203, 185, 161, 226, 129, 251, 132, 155]
    },
    {
      "name": "GlobalConfig",
      "discriminator": [149, 8, 156, 202, 160, 252, 176, 217]
    },
    {
      "name": "PoolConfig",
      "discriminator": [26, 108, 14, 123, 116, 230, 129, 43]
    },
    {
      "name": "PoolData",
      "discriminator": [155, 28, 220, 37, 221, 242, 70, 167]
    },
    {
      "name": "PositionData",
      "discriminator": [85, 195, 241, 79, 124, 192, 79, 11]
    },
    {
      "name": "PublisherCaps",
      "discriminator": [5, 87, 155, 44, 121, 90, 35, 134]
    },
    {
      "name": "SlashEvent",
      "discriminator": [60, 32, 32, 44, 93, 234, 234, 89]
    },
    {
      "name": "TargetMetadata",
      "discriminator": [157, 23, 139, 117, 181, 44, 197, 130]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "PublisherNotFound"
    },
    {
      "code": 6001,
      "name": "PublisherOrRewardAuthorityNeedsToSign"
    },
    {
      "code": 6002,
      "name": "StakeAccountOwnerNeedsToSign"
    },
    {
      "code": 6003,
      "name": "OutdatedPublisherAccounting"
    },
    {
      "code": 6004,
      "name": "TooManyPublishers"
    },
    {
      "code": 6005,
      "name": "UnexpectedPositionState"
    },
    {
      "code": 6006,
      "name": "PoolDataAlreadyUpToDate"
    },
    {
      "code": 6007,
      "name": "OutdatedPublisherCaps"
    },
    {
      "code": 6008,
      "name": "OutdatedDelegatorAccounting"
    },
    {
      "code": 6009,
      "name": "CurrentStakeAccountShouldBeUndelegated"
    },
    {
      "code": 6010,
      "name": "NewStakeAccountShouldBeUndelegated"
    },
    {
      "code": 6011,
      "name": "PublisherStakeAccountMismatch"
    },
    {
      "code": 6012,
      "name": "ThisCodeShouldBeUnreachable"
    },
    {
      "code": 6013,
      "name": "InsufficientRewards"
    },
    {
      "code": 6014,
      "name": "InvalidStartEpoch",
      "msg": "Start epoch of the reward program is before the current epoch"
    },
    {
      "code": 6015,
      "name": "UnverifiedPublisherCaps"
    },
    {
      "code": 6016,
      "name": "InvalidSlashEventIndex",
      "msg": "Slash event indexes must be sequential and start at 0"
    },
    {
      "code": 6017,
      "name": "InvalidRewardProgramAuthority"
    },
    {
      "code": 6018,
      "name": "InvalidPoolDataAccount"
    },
    {
      "code": 6019,
      "name": "WrongSlashEventOrder",
      "msg": "Slashes must be executed in order of slash event index"
    },
    {
      "code": 6020,
      "name": "PublisherCustodyAccountRequired",
      "msg": "Publisher custody account required"
    },
    {
      "code": 6021,
      "name": "InvalidDelegationFee",
      "msg": "Delegation fee must not be greater than 100%"
    },
    {
      "code": 6022,
      "name": "InvalidPublisher"
    },
    {
      "code": 6023,
      "name": "InvalidY",
      "msg": "Y should not be greater than 1%"
    },
    {
      "code": 6024,
      "name": "InvalidSlashCustodyAccount"
    }
  ],
  "types": [
    {
      "name": "DelegationRecord",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "last_epoch",
            "type": "u64"
          },
          {
            "name": "next_slash_event_index",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "DelegationState",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "total_delegation",
            "type": "u64"
          },
          {
            "name": "delta_delegation",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Event",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "epoch",
            "type": "u64"
          },
          {
            "name": "y",
            "type": "u64"
          },
          {
            "name": "extra_space",
            "type": {
              "array": ["u64", 7]
            }
          },
          {
            "name": "event_data",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "PublisherEventData"
                  }
                },
                1024
              ]
            }
          }
        ]
      }
    },
    {
      "name": "GlobalConfig",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "governance_authority",
            "type": "pubkey"
          },
          {
            "name": "pyth_token_mint",
            "type": "pubkey"
          },
          {
            "name": "pyth_governance_realm",
            "type": "pubkey"
          },
          {
            "name": "removed_unlocking_duration",
            "type": "u8"
          },
          {
            "name": "epoch_duration",
            "type": "u64"
          },
          {
            "name": "freeze",
            "type": "bool"
          },
          {
            "name": "pda_authority",
            "type": "pubkey"
          },
          {
            "name": "governance_program",
            "type": "pubkey"
          },
          {
            "name": "pyth_token_list_time",
            "docs": [
              "Once the pyth token is listed, governance can update the config to set this value.",
              "Once this value is set, vesting schedules that depend on the token list date can start",
              "vesting."
            ],
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "agreement_hash",
            "type": {
              "array": ["u8", 32]
            }
          },
          {
            "name": "mock_clock_time",
            "type": "i64"
          },
          {
            "name": "pool_authority",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "PoolConfig",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool_data",
            "type": "pubkey"
          },
          {
            "name": "reward_program_authority",
            "type": "pubkey"
          },
          {
            "name": "pyth_token_mint",
            "type": "pubkey"
          },
          {
            "name": "y",
            "type": "u64"
          },
          {
            "name": "slash_custody",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "PoolData",
      "serialization": "bytemuck",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "last_updated_epoch",
            "type": "u64"
          },
          {
            "name": "claimable_rewards",
            "type": "u64"
          },
          {
            "name": "publishers",
            "type": {
              "array": ["pubkey", 1024]
            }
          },
          {
            "name": "del_state",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "DelegationState"
                  }
                },
                1024
              ]
            }
          },
          {
            "name": "self_del_state",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "DelegationState"
                  }
                },
                1024
              ]
            }
          },
          {
            "name": "publisher_stake_accounts",
            "type": {
              "array": ["pubkey", 1024]
            }
          },
          {
            "name": "events",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "Event"
                  }
                },
                52
              ]
            }
          },
          {
            "name": "num_events",
            "type": "u64"
          },
          {
            "name": "num_slash_events",
            "type": {
              "array": ["u64", 1024]
            }
          },
          {
            "name": "delegation_fees",
            "type": {
              "array": ["u64", 1024]
            }
          }
        ]
      }
    },
    {
      "name": "PositionData",
      "docs": ["The header of DynamicPositionArray"],
      "serialization": "bytemuck",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "owner",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "PublisherCaps",
      "serialization": "bytemuck",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "write_authority",
            "type": "pubkey"
          },
          {
            "name": "is_verified",
            "type": "u8"
          },
          {
            "name": "padding",
            "type": {
              "array": ["u8", 4]
            }
          },
          {
            "name": "publisher_caps_message_buffer",
            "type": {
              "array": ["u8", 40971]
            }
          }
        ]
      }
    },
    {
      "name": "PublisherEventData",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "self_reward_ratio",
            "type": "u64"
          },
          {
            "name": "other_reward_ratio",
            "type": "u64"
          },
          {
            "name": "delegation_fee",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "SlashEvent",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "epoch",
            "type": "u64"
          },
          {
            "name": "slash_ratio",
            "type": "u64"
          },
          {
            "name": "slash_custody",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "TargetMetadata",
      "docs": [
        "This represents a target that users can stake to",
        "Currently we store the last time the target account was updated, the current locked balance",
        "and the amount by which the locked balance will change in the next epoch"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "last_update_at",
            "type": "u64"
          },
          {
            "name": "prev_epoch_locked",
            "type": "u64"
          },
          {
            "name": "locked",
            "type": "u64"
          },
          {
            "name": "delta_locked",
            "type": "i64"
          }
        ]
      }
    }
  ]
}
