[
  {
    "type": "impl",
    "name": "PythImpl",
    "interface_name": "pyth::pyth::interface::IPyth"
  },
  {
    "type": "struct",
    "name": "core::integer::u256",
    "members": [
      {
        "name": "low",
        "type": "core::integer::u128"
      },
      {
        "name": "high",
        "type": "core::integer::u128"
      }
    ]
  },
  {
    "type": "struct",
    "name": "pyth::pyth::interface::Price",
    "members": [
      {
        "name": "price",
        "type": "core::integer::i64"
      },
      {
        "name": "conf",
        "type": "core::integer::u64"
      },
      {
        "name": "expo",
        "type": "core::integer::i32"
      },
      {
        "name": "publish_time",
        "type": "core::integer::u64"
      }
    ]
  },
  {
    "type": "enum",
    "name": "pyth::pyth::errors::GetPriceNoOlderThanError",
    "variants": [
      {
        "name": "PriceFeedNotFound",
        "type": "()"
      },
      {
        "name": "StalePrice",
        "type": "()"
      }
    ]
  },
  {
    "type": "enum",
    "name": "core::result::Result::<pyth::pyth::interface::Price, pyth::pyth::errors::GetPriceNoOlderThanError>",
    "variants": [
      {
        "name": "Ok",
        "type": "pyth::pyth::interface::Price"
      },
      {
        "name": "Err",
        "type": "pyth::pyth::errors::GetPriceNoOlderThanError"
      }
    ]
  },
  {
    "type": "enum",
    "name": "pyth::pyth::errors::GetPriceUnsafeError",
    "variants": [
      {
        "name": "PriceFeedNotFound",
        "type": "()"
      }
    ]
  },
  {
    "type": "enum",
    "name": "core::result::Result::<pyth::pyth::interface::Price, pyth::pyth::errors::GetPriceUnsafeError>",
    "variants": [
      {
        "name": "Ok",
        "type": "pyth::pyth::interface::Price"
      },
      {
        "name": "Err",
        "type": "pyth::pyth::errors::GetPriceUnsafeError"
      }
    ]
  },
  {
    "type": "struct",
    "name": "pyth::pyth::interface::PriceFeed",
    "members": [
      {
        "name": "id",
        "type": "core::integer::u256"
      },
      {
        "name": "price",
        "type": "pyth::pyth::interface::Price"
      },
      {
        "name": "ema_price",
        "type": "pyth::pyth::interface::Price"
      }
    ]
  },
  {
    "type": "enum",
    "name": "core::result::Result::<pyth::pyth::interface::PriceFeed, pyth::pyth::errors::GetPriceNoOlderThanError>",
    "variants": [
      {
        "name": "Ok",
        "type": "pyth::pyth::interface::PriceFeed"
      },
      {
        "name": "Err",
        "type": "pyth::pyth::errors::GetPriceNoOlderThanError"
      }
    ]
  },
  {
    "type": "enum",
    "name": "core::result::Result::<pyth::pyth::interface::PriceFeed, pyth::pyth::errors::GetPriceUnsafeError>",
    "variants": [
      {
        "name": "Ok",
        "type": "pyth::pyth::interface::PriceFeed"
      },
      {
        "name": "Err",
        "type": "pyth::pyth::errors::GetPriceUnsafeError"
      }
    ]
  },
  {
    "type": "enum",
    "name": "core::bool",
    "variants": [
      {
        "name": "False",
        "type": "()"
      },
      {
        "name": "True",
        "type": "()"
      }
    ]
  },
  {
    "type": "struct",
    "name": "pyth::byte_buffer::ByteBuffer",
    "members": [
      {
        "name": "num_last_bytes",
        "type": "core::integer::u8"
      },
      {
        "name": "data",
        "type": "core::array::Array::<core::felt252>"
      }
    ]
  },
  {
    "type": "struct",
    "name": "pyth::pyth::interface::PriceFeedPublishTime",
    "members": [
      {
        "name": "price_id",
        "type": "core::integer::u256"
      },
      {
        "name": "publish_time",
        "type": "core::integer::u64"
      }
    ]
  },
  {
    "type": "struct",
    "name": "pyth::pyth::interface::DataSource",
    "members": [
      {
        "name": "emitter_chain_id",
        "type": "core::integer::u16"
      },
      {
        "name": "emitter_address",
        "type": "core::integer::u256"
      }
    ]
  },
  {
    "type": "interface",
    "name": "pyth::pyth::interface::IPyth",
    "items": [
      {
        "type": "function",
        "name": "get_price_no_older_than",
        "inputs": [
          {
            "name": "price_id",
            "type": "core::integer::u256"
          },
          {
            "name": "age",
            "type": "core::integer::u64"
          }
        ],
        "outputs": [
          {
            "type": "core::result::Result::<pyth::pyth::interface::Price, pyth::pyth::errors::GetPriceNoOlderThanError>"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "get_price_unsafe",
        "inputs": [
          {
            "name": "price_id",
            "type": "core::integer::u256"
          }
        ],
        "outputs": [
          {
            "type": "core::result::Result::<pyth::pyth::interface::Price, pyth::pyth::errors::GetPriceUnsafeError>"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "get_ema_price_no_older_than",
        "inputs": [
          {
            "name": "price_id",
            "type": "core::integer::u256"
          },
          {
            "name": "age",
            "type": "core::integer::u64"
          }
        ],
        "outputs": [
          {
            "type": "core::result::Result::<pyth::pyth::interface::Price, pyth::pyth::errors::GetPriceNoOlderThanError>"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "get_ema_price_unsafe",
        "inputs": [
          {
            "name": "price_id",
            "type": "core::integer::u256"
          }
        ],
        "outputs": [
          {
            "type": "core::result::Result::<pyth::pyth::interface::Price, pyth::pyth::errors::GetPriceUnsafeError>"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "query_price_feed_no_older_than",
        "inputs": [
          {
            "name": "price_id",
            "type": "core::integer::u256"
          },
          {
            "name": "age",
            "type": "core::integer::u64"
          }
        ],
        "outputs": [
          {
            "type": "core::result::Result::<pyth::pyth::interface::PriceFeed, pyth::pyth::errors::GetPriceNoOlderThanError>"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "query_price_feed_unsafe",
        "inputs": [
          {
            "name": "price_id",
            "type": "core::integer::u256"
          }
        ],
        "outputs": [
          {
            "type": "core::result::Result::<pyth::pyth::interface::PriceFeed, pyth::pyth::errors::GetPriceUnsafeError>"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "price_feed_exists",
        "inputs": [
          {
            "name": "price_id",
            "type": "core::integer::u256"
          }
        ],
        "outputs": [
          {
            "type": "core::bool"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "latest_price_info_publish_time",
        "inputs": [
          {
            "name": "price_id",
            "type": "core::integer::u256"
          }
        ],
        "outputs": [
          {
            "type": "core::integer::u64"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "update_price_feeds",
        "inputs": [
          {
            "name": "data",
            "type": "pyth::byte_buffer::ByteBuffer"
          }
        ],
        "outputs": [],
        "state_mutability": "external"
      },
      {
        "type": "function",
        "name": "update_price_feeds_if_necessary",
        "inputs": [
          {
            "name": "update",
            "type": "pyth::byte_buffer::ByteBuffer"
          },
          {
            "name": "required_publish_times",
            "type": "core::array::Array::<pyth::pyth::interface::PriceFeedPublishTime>"
          }
        ],
        "outputs": [],
        "state_mutability": "external"
      },
      {
        "type": "function",
        "name": "parse_price_feed_updates",
        "inputs": [
          {
            "name": "data",
            "type": "pyth::byte_buffer::ByteBuffer"
          },
          {
            "name": "price_ids",
            "type": "core::array::Array::<core::integer::u256>"
          },
          {
            "name": "min_publish_time",
            "type": "core::integer::u64"
          },
          {
            "name": "max_publish_time",
            "type": "core::integer::u64"
          }
        ],
        "outputs": [
          {
            "type": "core::array::Array::<pyth::pyth::interface::PriceFeed>"
          }
        ],
        "state_mutability": "external"
      },
      {
        "type": "function",
        "name": "parse_unique_price_feed_updates",
        "inputs": [
          {
            "name": "data",
            "type": "pyth::byte_buffer::ByteBuffer"
          },
          {
            "name": "price_ids",
            "type": "core::array::Array::<core::integer::u256>"
          },
          {
            "name": "publish_time",
            "type": "core::integer::u64"
          },
          {
            "name": "max_staleness",
            "type": "core::integer::u64"
          }
        ],
        "outputs": [
          {
            "type": "core::array::Array::<pyth::pyth::interface::PriceFeed>"
          }
        ],
        "state_mutability": "external"
      },
      {
        "type": "function",
        "name": "get_update_fee",
        "inputs": [
          {
            "name": "data",
            "type": "pyth::byte_buffer::ByteBuffer"
          },
          {
            "name": "token",
            "type": "core::starknet::contract_address::ContractAddress"
          }
        ],
        "outputs": [
          {
            "type": "core::integer::u256"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "wormhole_address",
        "inputs": [],
        "outputs": [
          {
            "type": "core::starknet::contract_address::ContractAddress"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "fee_token_addresses",
        "inputs": [],
        "outputs": [
          {
            "type": "core::array::Array::<core::starknet::contract_address::ContractAddress>"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "get_single_update_fee",
        "inputs": [
          {
            "name": "token",
            "type": "core::starknet::contract_address::ContractAddress"
          }
        ],
        "outputs": [
          {
            "type": "core::integer::u256"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "valid_data_sources",
        "inputs": [],
        "outputs": [
          {
            "type": "core::array::Array::<pyth::pyth::interface::DataSource>"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "is_valid_data_source",
        "inputs": [
          {
            "name": "source",
            "type": "pyth::pyth::interface::DataSource"
          }
        ],
        "outputs": [
          {
            "type": "core::bool"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "governance_data_source",
        "inputs": [],
        "outputs": [
          {
            "type": "pyth::pyth::interface::DataSource"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "is_valid_governance_data_source",
        "inputs": [
          {
            "name": "source",
            "type": "pyth::pyth::interface::DataSource"
          }
        ],
        "outputs": [
          {
            "type": "core::bool"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "last_executed_governance_sequence",
        "inputs": [],
        "outputs": [
          {
            "type": "core::integer::u64"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "governance_data_source_index",
        "inputs": [],
        "outputs": [
          {
            "type": "core::integer::u32"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "chain_id",
        "inputs": [],
        "outputs": [
          {
            "type": "core::integer::u16"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "execute_governance_instruction",
        "inputs": [
          {
            "name": "data",
            "type": "pyth::byte_buffer::ByteBuffer"
          }
        ],
        "outputs": [],
        "state_mutability": "external"
      },
      {
        "type": "function",
        "name": "version",
        "inputs": [],
        "outputs": [
          {
            "type": "core::felt252"
          }
        ],
        "state_mutability": "view"
      },
      {
        "type": "function",
        "name": "pyth_upgradable_magic",
        "inputs": [],
        "outputs": [
          {
            "type": "core::integer::u32"
          }
        ],
        "state_mutability": "view"
      }
    ]
  },
  {
    "type": "constructor",
    "name": "constructor",
    "inputs": [
      {
        "name": "wormhole_address",
        "type": "core::starknet::contract_address::ContractAddress"
      },
      {
        "name": "fee_token_address1",
        "type": "core::starknet::contract_address::ContractAddress"
      },
      {
        "name": "single_update_fee1",
        "type": "core::integer::u256"
      },
      {
        "name": "fee_token_address2",
        "type": "core::starknet::contract_address::ContractAddress"
      },
      {
        "name": "single_update_fee2",
        "type": "core::integer::u256"
      },
      {
        "name": "data_sources",
        "type": "core::array::Array::<pyth::pyth::interface::DataSource>"
      },
      {
        "name": "governance_emitter_chain_id",
        "type": "core::integer::u16"
      },
      {
        "name": "governance_emitter_address",
        "type": "core::integer::u256"
      },
      {
        "name": "governance_initial_sequence",
        "type": "core::integer::u64"
      }
    ]
  },
  {
    "type": "event",
    "name": "pyth::pyth::pyth::PriceFeedUpdated",
    "kind": "struct",
    "members": [
      {
        "name": "price_id",
        "type": "core::integer::u256",
        "kind": "key"
      },
      {
        "name": "price",
        "type": "core::integer::i64",
        "kind": "data"
      },
      {
        "name": "conf",
        "type": "core::integer::u64",
        "kind": "data"
      },
      {
        "name": "publish_time",
        "type": "core::integer::u64",
        "kind": "data"
      }
    ]
  },
  {
    "type": "event",
    "name": "pyth::pyth::pyth::FeeSet",
    "kind": "struct",
    "members": [
      {
        "name": "old_fee",
        "type": "core::integer::u256",
        "kind": "data"
      },
      {
        "name": "new_fee",
        "type": "core::integer::u256",
        "kind": "data"
      },
      {
        "name": "token",
        "type": "core::starknet::contract_address::ContractAddress",
        "kind": "data"
      }
    ]
  },
  {
    "type": "event",
    "name": "pyth::pyth::pyth::DataSourcesSet",
    "kind": "struct",
    "members": [
      {
        "name": "old_data_sources",
        "type": "core::array::Array::<pyth::pyth::interface::DataSource>",
        "kind": "data"
      },
      {
        "name": "new_data_sources",
        "type": "core::array::Array::<pyth::pyth::interface::DataSource>",
        "kind": "data"
      }
    ]
  },
  {
    "type": "event",
    "name": "pyth::pyth::pyth::WormholeAddressSet",
    "kind": "struct",
    "members": [
      {
        "name": "old_address",
        "type": "core::starknet::contract_address::ContractAddress",
        "kind": "data"
      },
      {
        "name": "new_address",
        "type": "core::starknet::contract_address::ContractAddress",
        "kind": "data"
      }
    ]
  },
  {
    "type": "event",
    "name": "pyth::pyth::pyth::GovernanceDataSourceSet",
    "kind": "struct",
    "members": [
      {
        "name": "old_data_source",
        "type": "pyth::pyth::interface::DataSource",
        "kind": "data"
      },
      {
        "name": "new_data_source",
        "type": "pyth::pyth::interface::DataSource",
        "kind": "data"
      },
      {
        "name": "last_executed_governance_sequence",
        "type": "core::integer::u64",
        "kind": "data"
      }
    ]
  },
  {
    "type": "event",
    "name": "pyth::pyth::pyth::ContractUpgraded",
    "kind": "struct",
    "members": [
      {
        "name": "new_class_hash",
        "type": "core::starknet::class_hash::ClassHash",
        "kind": "data"
      }
    ]
  },
  {
    "type": "event",
    "name": "pyth::pyth::pyth::Event",
    "kind": "enum",
    "variants": [
      {
        "name": "PriceFeedUpdated",
        "type": "pyth::pyth::pyth::PriceFeedUpdated",
        "kind": "nested"
      },
      {
        "name": "FeeSet",
        "type": "pyth::pyth::pyth::FeeSet",
        "kind": "nested"
      },
      {
        "name": "DataSourcesSet",
        "type": "pyth::pyth::pyth::DataSourcesSet",
        "kind": "nested"
      },
      {
        "name": "WormholeAddressSet",
        "type": "pyth::pyth::pyth::WormholeAddressSet",
        "kind": "nested"
      },
      {
        "name": "GovernanceDataSourceSet",
        "type": "pyth::pyth::pyth::GovernanceDataSourceSet",
        "kind": "nested"
      },
      {
        "name": "ContractUpgraded",
        "type": "pyth::pyth::pyth::ContractUpgraded",
        "kind": "nested"
      }
    ]
  }
]
