Skip to content

Commit

Permalink
audit: unused functions parameters (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordyRo1 authored Nov 16, 2023
1 parent 3138786 commit ef33a5f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/compute_engines/yield_curve/yield_curve.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ mod YieldCurve {
continue;
} else {
let shifted_on_value = change_decimals(
self, output.price, output.decimals, output_decimals
output.price, output.decimals, output_decimals
);
yield_points
.append(
Expand Down Expand Up @@ -848,9 +848,7 @@ mod YieldCurve {
}


fn change_decimals(
self: @ContractState, value: u128, old_decimals: u32, new_decimals: u32
) -> u128 {
fn change_decimals(value: u128, old_decimals: u32, new_decimals: u32) -> u128 {
if (old_decimals <= new_decimals) {
// Multiply on_entry by 10 ^ (new_decimals - old_decimals)
// which is guaranteed to be an integer > 0 by the if statement
Expand Down
2 changes: 0 additions & 2 deletions src/randomness/randomness.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ trait IRandomness<TContractState> {
callback_address: ContractAddress,
callback_gas_limit: u64,
random_words: Span<felt252>,
block_hash: felt252,
proof: Span<felt252>,
);
fn get_pending_requests(
Expand Down Expand Up @@ -226,7 +225,6 @@ mod Randomness {
callback_address: ContractAddress,
callback_gas_limit: u64,
random_words: Span<felt252>,
block_hash: felt252,
proof: Span<felt252>,
) {
assert_only_admin();
Expand Down
1 change: 0 additions & 1 deletion src/tests/test_randomness.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ fn test_randomness() {
callback_address,
callback_gas_limit,
random_words.span(),
block_hash,
proof.span()
);
let res = example_randomness.get_last_random();
Expand Down

0 comments on commit ef33a5f

Please sign in to comment.