switchboard_solana/oracle_program/accounts/job.rs
1use crate::prelude::*;
2
3#[account]
4pub struct JobAccountData {
5 /// Name of the job to store on-chain.
6 pub name: [u8; 32],
7 /// Metadata of the job to store on-chain.
8 pub metadata: [u8; 64],
9 /// The account delegated as the authority for making account changes.
10 pub authority: Pubkey,
11 /// Unix timestamp when the job is considered invalid
12 pub expiration: i64,
13 /// Hash of the serialized data to prevent tampering.
14 pub hash: [u8; 32],
15 /// Serialized protobuf containing the collection of task to retrieve data off-chain.
16 pub data: Vec<u8>,
17 /// The number of data feeds referencing the job account..
18 pub reference_count: u32,
19 /// The token amount funded into a feed that contains this job account.
20 pub total_spent: u64,
21 /// Unix timestamp when the job was created on-chain.
22 pub created_at: i64,
23 pub is_initializing: u8,
24}
25
26impl JobAccountData {}