{
  "address": "id11111111111111111111111111111111111111111",
  "metadata": {
    "name": "idl",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "Created with Anchor"
  },
  "docs": [
    "IDL test program documentation."
  ],
  "instructions": [
    {
      "name": "cause_error",
      "discriminator": [
        67,
        104,
        37,
        17,
        2,
        155,
        68,
        17
      ],
      "accounts": [],
      "args": []
    },
    {
      "name": "initialize",
      "discriminator": [
        175,
        175,
        109,
        31,
        13,
        152,
        155,
        237
      ],
      "accounts": [
        {
          "name": "state",
          "docs": [
            "State account"
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "nested",
          "accounts": [
            {
              "name": "clock",
              "docs": [
                "Sysvar clock"
              ],
              "address": "SysvarC1ock11111111111111111111111111111111"
            },
            {
              "name": "rent",
              "address": "SysvarRent111111111111111111111111111111111"
            }
          ]
        },
        {
          "name": "zc_account"
        },
        {
          "name": "token_account"
        },
        {
          "name": "mint_account"
        },
        {
          "name": "token_interface_account"
        },
        {
          "name": "mint_interface_account"
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "initialize_with_values",
      "docs": [
        "Initializes an account with specified values"
      ],
      "discriminator": [
        220,
        73,
        8,
        213,
        178,
        69,
        181,
        141
      ],
      "accounts": [
        {
          "name": "state",
          "docs": [
            "State account"
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "nested",
          "accounts": [
            {
              "name": "clock",
              "docs": [
                "Sysvar clock"
              ],
              "address": "SysvarC1ock11111111111111111111111111111111"
            },
            {
              "name": "rent",
              "address": "SysvarRent111111111111111111111111111111111"
            }
          ]
        },
        {
          "name": "zc_account"
        },
        {
          "name": "token_account"
        },
        {
          "name": "mint_account"
        },
        {
          "name": "token_interface_account"
        },
        {
          "name": "mint_interface_account"
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "bool_field",
          "type": "bool"
        },
        {
          "name": "u8_field",
          "type": "u8"
        },
        {
          "name": "i8_field",
          "type": "i8"
        },
        {
          "name": "u16_field",
          "type": "u16"
        },
        {
          "name": "i16_field",
          "type": "i16"
        },
        {
          "name": "u32_field",
          "type": "u32"
        },
        {
          "name": "i32_field",
          "type": "i32"
        },
        {
          "name": "f32_field",
          "type": "f32"
        },
        {
          "name": "u64_field",
          "type": "u64"
        },
        {
          "name": "i64_field",
          "type": "i64"
        },
        {
          "name": "f64_field",
          "type": "f64"
        },
        {
          "name": "u128_field",
          "type": "u128"
        },
        {
          "name": "i128_field",
          "type": "i128"
        },
        {
          "name": "bytes_field",
          "type": "bytes"
        },
        {
          "name": "string_field",
          "type": "string"
        },
        {
          "name": "pubkey_field",
          "type": "pubkey"
        },
        {
          "name": "vec_field",
          "type": {
            "vec": "u64"
          }
        },
        {
          "name": "vec_struct_field",
          "type": {
            "vec": {
              "defined": {
                "name": "FooStruct"
              }
            }
          }
        },
        {
          "name": "option_field",
          "type": {
            "option": "bool"
          }
        },
        {
          "name": "option_struct_field",
          "type": {
            "option": {
              "defined": {
                "name": "FooStruct"
              }
            }
          }
        },
        {
          "name": "struct_field",
          "type": {
            "defined": {
              "name": "FooStruct"
            }
          }
        },
        {
          "name": "array_field",
          "type": {
            "array": [
              "bool",
              3
            ]
          }
        },
        {
          "name": "enum_field_1",
          "type": {
            "defined": {
              "name": "FooEnum"
            }
          }
        },
        {
          "name": "enum_field_2",
          "type": {
            "defined": {
              "name": "FooEnum"
            }
          }
        },
        {
          "name": "enum_field_3",
          "type": {
            "defined": {
              "name": "FooEnum"
            }
          }
        },
        {
          "name": "enum_field_4",
          "type": {
            "defined": {
              "name": "FooEnum"
            }
          }
        }
      ]
    },
    {
      "name": "initialize_with_values2",
      "docs": [
        "a separate instruction due to initialize_with_values having too many arguments",
        "https://github.com/solana-labs/solana/issues/23978"
      ],
      "discriminator": [
        248,
        190,
        21,
        97,
        239,
        148,
        39,
        181
      ],
      "accounts": [
        {
          "name": "state",
          "writable": true,
          "signer": true
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "vec_of_option",
          "type": {
            "vec": {
              "option": "u64"
            }
          }
        },
        {
          "name": "box_field",
          "type": "bool"
        }
      ],
      "returns": {
        "defined": {
          "name": "SomeRetStruct"
        }
      }
    }
  ],
  "accounts": [
    {
      "name": "SomeZcAccount",
      "discriminator": [
        56,
        72,
        82,
        194,
        210,
        35,
        17,
        191
      ]
    },
    {
      "name": "State",
      "discriminator": [
        216,
        146,
        107,
        94,
        104,
        75,
        182,
        177
      ]
    },
    {
      "name": "State2",
      "discriminator": [
        106,
        97,
        255,
        161,
        250,
        205,
        185,
        192
      ]
    }
  ],
  "events": [
    {
      "name": "SomeEvent",
      "discriminator": [
        39,
        221,
        150,
        148,
        91,
        206,
        29,
        93
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "SomeError",
      "msg": "Example error."
    },
    {
      "code": 6001,
      "name": "OtherError",
      "msg": "Another error."
    },
    {
      "code": 6002,
      "name": "ErrorWithoutMsg"
    }
  ],
  "types": [
    {
      "name": "BarStruct",
      "docs": [
        "Bar struct type"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "some_field",
            "docs": [
              "Some field"
            ],
            "type": "bool"
          },
          {
            "name": "other_field",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "FooEnum",
      "docs": [
        "Enum type"
      ],
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Unnamed",
            "fields": [
              "bool",
              "u8",
              {
                "defined": {
                  "name": "BarStruct"
                }
              }
            ]
          },
          {
            "name": "UnnamedSingle",
            "fields": [
              {
                "defined": {
                  "name": "BarStruct"
                }
              }
            ]
          },
          {
            "name": "Named",
            "fields": [
              {
                "name": "bool_field",
                "docs": [
                  "A bool field inside a struct tuple kind"
                ],
                "type": "bool"
              },
              {
                "name": "u8_field",
                "type": "u8"
              },
              {
                "name": "nested",
                "type": {
                  "defined": {
                    "name": "BarStruct"
                  }
                }
              }
            ]
          },
          {
            "name": "Struct",
            "fields": [
              {
                "defined": {
                  "name": "BarStruct"
                }
              }
            ]
          },
          {
            "name": "OptionStruct",
            "fields": [
              {
                "option": {
                  "defined": {
                    "name": "BarStruct"
                  }
                }
              }
            ]
          },
          {
            "name": "VecStruct",
            "fields": [
              {
                "vec": {
                  "defined": {
                    "name": "BarStruct"
                  }
                }
              }
            ]
          },
          {
            "name": "NoFields"
          }
        ]
      }
    },
    {
      "name": "FooStruct",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "field1",
            "type": "u8"
          },
          {
            "name": "field2",
            "type": "u16"
          },
          {
            "name": "nested",
            "type": {
              "defined": {
                "name": "BarStruct"
              }
            }
          },
          {
            "name": "vec_nested",
            "type": {
              "vec": {
                "defined": {
                  "name": "BarStruct"
                }
              }
            }
          },
          {
            "name": "option_nested",
            "type": {
              "option": {
                "defined": {
                  "name": "BarStruct"
                }
              }
            }
          },
          {
            "name": "enum_field",
            "type": {
              "defined": {
                "name": "FooEnum"
              }
            }
          }
        ]
      }
    },
    {
      "name": "SomeEvent",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bool_field",
            "type": "bool"
          },
          {
            "name": "external_my_struct",
            "type": {
              "defined": {
                "name": "external::MyStruct"
              }
            }
          },
          {
            "name": "other_module_my_struct",
            "type": {
              "defined": {
                "name": "idl::some_other_module::MyStruct"
              }
            }
          }
        ]
      }
    },
    {
      "name": "SomeRetStruct",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "some_field",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "SomeZcAccount",
      "serialization": "bytemuck",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "field",
            "type": {
              "defined": {
                "name": "ZcStruct"
              }
            }
          }
        ]
      }
    },
    {
      "name": "State",
      "docs": [
        "An account containing various fields"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bool_field",
            "docs": [
              "A boolean field"
            ],
            "type": "bool"
          },
          {
            "name": "u8_field",
            "type": "u8"
          },
          {
            "name": "i8_field",
            "type": "i8"
          },
          {
            "name": "u16_field",
            "type": "u16"
          },
          {
            "name": "i16_field",
            "type": "i16"
          },
          {
            "name": "u32_field",
            "type": "u32"
          },
          {
            "name": "i32_field",
            "type": "i32"
          },
          {
            "name": "f32_field",
            "type": "f32"
          },
          {
            "name": "u64_field",
            "type": "u64"
          },
          {
            "name": "i64_field",
            "type": "i64"
          },
          {
            "name": "f64_field",
            "type": "f64"
          },
          {
            "name": "u128_field",
            "type": "u128"
          },
          {
            "name": "i128_field",
            "type": "i128"
          },
          {
            "name": "bytes_field",
            "type": "bytes"
          },
          {
            "name": "string_field",
            "type": "string"
          },
          {
            "name": "pubkey_field",
            "type": "pubkey"
          },
          {
            "name": "vec_field",
            "type": {
              "vec": "u64"
            }
          },
          {
            "name": "vec_struct_field",
            "type": {
              "vec": {
                "defined": {
                  "name": "FooStruct"
                }
              }
            }
          },
          {
            "name": "option_field",
            "type": {
              "option": "bool"
            }
          },
          {
            "name": "option_struct_field",
            "type": {
              "option": {
                "defined": {
                  "name": "FooStruct"
                }
              }
            }
          },
          {
            "name": "struct_field",
            "type": {
              "defined": {
                "name": "FooStruct"
              }
            }
          },
          {
            "name": "array_field",
            "type": {
              "array": [
                "bool",
                3
              ]
            }
          },
          {
            "name": "enum_field_1",
            "type": {
              "defined": {
                "name": "FooEnum"
              }
            }
          },
          {
            "name": "enum_field_2",
            "type": {
              "defined": {
                "name": "FooEnum"
              }
            }
          },
          {
            "name": "enum_field_3",
            "type": {
              "defined": {
                "name": "FooEnum"
              }
            }
          },
          {
            "name": "enum_field_4",
            "type": {
              "defined": {
                "name": "FooEnum"
              }
            }
          }
        ]
      }
    },
    {
      "name": "State2",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "vec_of_option",
            "type": {
              "vec": {
                "option": "u64"
              }
            }
          },
          {
            "name": "box_field",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "ZcStruct",
      "serialization": "bytemuck",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "some_field",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "external::MyStruct",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "some_field",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "idl::some_other_module::MyStruct",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "some_u8",
            "type": "u8"
          }
        ]
      }
    }
  ],
  "constants": [
    {
      "name": "BYTES_STR",
      "type": "bytes",
      "value": "[116, 101, 115, 116]"
    },
    {
      "name": "BYTE_STR",
      "type": "u8",
      "value": "116"
    },
    {
      "name": "I128",
      "type": "i128",
      "value": "1000000"
    },
    {
      "name": "U8",
      "type": "u8",
      "value": "6"
    }
  ]
}