{
"address": "rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ",
"metadata": {
"name": "price_feed",
"version": "0.1.0",
"spec": "0.1.0",
"description": "Created with Anchor"
},
"instructions": [],
"accounts": [
{
"name": "PriceUpdateV2",
"discriminator": [34, 241, 35, 99, 157, 126, 244, 205]
}
],
"types": [
{
"name": "PriceFeedMessage",
"type": {
"kind": "struct",
"fields": [
{
"name": "feed_id",
"docs": [
"`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."
],
"type": {
"array": ["u8", 32]
}
},
{
"name": "price",
"type": "i64"
},
{
"name": "conf",
"type": "u64"
},
{
"name": "exponent",
"type": "i32"
},
{
"name": "publish_time",
"docs": ["The timestamp of this price update in seconds"],
"type": "i64"
},
{
"name": "prev_publish_time",
"docs": [
"The timestamp of the previous price update. This field is intended to allow users to",
"identify the single unique price update for any moment in time:",
"for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.",
"",
"Note that there may not be such an update while we are migrating to the new message-sending logic,",
"as some price updates on pythnet may not be sent to other chains (because the message-sending",
"logic may not have triggered). We can solve this problem by making the message-sending mandatory",
"(which we can do once publishers have migrated over).",
"",
"Additionally, this field may be equal to publish_time if the message is sent on a slot where",
"where the aggregation was unsuccesful. This problem will go away once all publishers have",
"migrated over to a recent version of pyth-agent."
],
"type": "i64"
},
{
"name": "ema_price",
"type": "i64"
},
{
"name": "ema_conf",
"type": "u64"
}
]
}
},
{
"name": "PriceUpdateV2",
"type": {
"kind": "struct",
"fields": [
{
"name": "write_authority",
"type": "pubkey"
},
{
"name": "verification_level",
"type": {
"defined": {
"name": "VerificationLevel"
}
}
},
{
"name": "price_message",
"type": {
"defined": {
"name": "PriceFeedMessage"
}
}
},
{
"name": "posted_slot",
"type": "u64"
}
]
}
},
{
"name": "VerificationLevel",
"type": {
"kind": "enum",
"variants": [
{
"name": "Partial",
"fields": [
{
"name": "num_signatures",
"type": "u8"
}
]
},
{
"name": "Full"
}
]
}
}
]
}