Skip to content

Commit

Permalink
Merge branch 'main' into cleaning-code
Browse files Browse the repository at this point in the history
  • Loading branch information
diyahir authored Sep 6, 2024
2 parents 2d61423 + 91ef4d5 commit 335ca7c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 22 deletions.
Binary file removed contracts/fpt-staking-contract/.DS_Store
Binary file not shown.
22 changes: 0 additions & 22 deletions contracts/fpt-staking-contract/Forc.lock

This file was deleted.

5 changes: 5 additions & 0 deletions contracts/fpt-staking-contract/src/main.sw
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ impl FPTStaking for Contract {
internal_get_pending_usdf_gain(id)
}

#[storage(read)]
fn get_staking_balance(id: Identity) -> u64 {
storage.stakes.get(id).try_read().unwrap_or(0)
}

#[storage(read, write)]
fn increase_f_usdf(usdf_fee_amount: u64) {
require_is_borrower_operations();
Expand Down
3 changes: 3 additions & 0 deletions libraries/src/fpt_staking_interface.sw
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ abi FPTStaking {
#[storage(read)]
fn get_pending_usdf_gain(id: Identity) -> u64;

#[storage(read)]
fn get_staking_balance(id: Identity) -> u64;

#[storage(read, write)]
fn increase_f_usdf(usdf_fee_amount: u64);

Expand Down

0 comments on commit 335ca7c

Please sign in to comment.