Skip to content

Commit b0f7cd3

Browse files
Audit #2 (#1307)
* address runtime panics * default pubkey not allowed as admin * add checks for ownership * fix typo * standardize data.len check * linting * update transfer conditions * fix pda creation * fix pda creation set_decimal_feed_config * make workflow metadata list smaller * receiver program belongs in forwarder authority seeds * verify account context hashes in report * fix orphaned config/perm accounts * beef up events * clarify instruction limits * add documentation for closing accounts * add docstrings * add doc for updating legacy feed inst * docstrings for cache * add cache struct documentation * add forwarder docstrings * efficient payload serialization * simplify logic * redundant sorting * remove closed account discriminator * remove unused errors * todos complete * fix documentation + add forwarder program id in cache state * typos * inconsistent naming * use is_empty * renaming items * remove unused params * simplify filtering * compile-time assertion * simplify feed admin * reformat cache directory * lint * final report fixes * fix typo + remove close_account * fix seeds * lint * update generated bindings * fix generated * fix linter * format * add len-prefix to msg hash * fix program id --------- Co-authored-by: Vladimir <vladimir.shchukin@smartcontract.com>
1 parent 369994c commit b0f7cd3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2567
-1663
lines changed

contracts/crates/chainlink-solana-data-feeds-cache/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ use anchor_lang::prelude::*;
22
use data_feeds_cache::state::WorkflowMetadata;
33
use solana_program::account_info::AccountInfo;
44

5+
/// The data ids passed in must match the ordering of the decimal reports input.
6+
/// Developer is responsible for deriving the correct PDAs for the report before calling the function
57
pub fn query_values<'info>(
68
data_cache_program: AccountInfo<'info>,
79
cache_state: AccountInfo<'info>,
@@ -18,6 +20,10 @@ pub fn query_values<'info>(
1820
Ok(values)
1921
}
2022

23+
/// Returns a feed's workflow metadata. Chunks return values by `max_count`.
24+
/// Can be used on-chain to verify a feed's configuration.
25+
/// If `start_index` is out of bounds the function will return an empty array.
26+
/// If `max_count = 0` then function will return the entire workflow metadata list.
2127
pub fn query_feed_metadata<'info>(
2228
data_cache_program: AccountInfo<'info>,
2329
cache_state: AccountInfo<'info>,

contracts/generated/data_feeds_cache/AcceptOwnership.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/generated/data_feeds_cache/CloseDecimalReport.go

Lines changed: 187 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/generated/data_feeds_cache/CloseDecimalReports_test.go renamed to contracts/generated/data_feeds_cache/CloseDecimalReport_test.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/generated/data_feeds_cache/CloseDecimalReports.go

Lines changed: 0 additions & 146 deletions
This file was deleted.

contracts/generated/data_feeds_cache/CloseLegacyFeedsConfig.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)