Skip to content

Commit

Permalink
doc: doc
Browse files Browse the repository at this point in the history
  • Loading branch information
VladasZ committed Jul 31, 2024
1 parent 77cb8ab commit 77d0186
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contract/src/ft_receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct StakeMessage {
/// An optional account ID representing the intended owner of the created jar.
receiver_id: Option<crate::AccountId>,

/// And optional user timezone. Required for creating step jars.
/// An optional user timezone. Required for creating step jars.
timezone: Option<Timezone>,
}

Expand Down
16 changes: 15 additions & 1 deletion model/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,21 @@ pub trait WithdrawApi {

#[make_integration_version]
pub trait ScoreApi {
/// TODO: document
/// Records the score for a batch of accounts and updates their jars score accordingly.
///
/// This method processes a batch of new scores for multiple accounts, updates their
/// respective jars score, calculates interest based on the current timestamp, and emits
/// an event with the recorded scores.
///
/// # Arguments
///
/// * `batch` - A vector of tuples, where each tuple contains an `AccountId` and a vector
/// of tuples representing the new scores and their associated timestamps (in UTC).
///
/// # Panics
///
/// - This function will panic if an account does not have score jars.
/// - This function will panic if a product associated with a jar does not exist.
fn record_score(&mut self, batch: Vec<(AccountId, Vec<(Score, UTC)>)>);
}

Expand Down

0 comments on commit 77d0186

Please sign in to comment.