Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbrs committed Aug 23, 2024
1 parent a3e3bf6 commit 0fd63ff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/components/offsetter/offset_handler.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ mod OffsetComponent {
}

fn retire_list_carbon_credits(
ref self: ComponentState<TContractState>,
vintages: Span<u256>,
cc_values: Span<u256>
ref self: ComponentState<TContractState>, vintages: Span<u256>, cc_values: Span<u256>
) {
// [Check] vintages and carbon values are defined
assert(vintages.len() > 0, 'Inputs cannot be empty');
Expand Down
4 changes: 3 additions & 1 deletion tests/test_mint.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ fn test_is_sold_out() {
let expected_event_sale_close = MintComponent::Event::PublicSaleClose(
MintComponent::PublicSaleClose { old_value: true, new_value: false }
);
let expected_event_sold_out = MintComponent::Event::SoldOut(MintComponent::SoldOut { sold_out: true });
let expected_event_sold_out = MintComponent::Event::SoldOut(
MintComponent::SoldOut { sold_out: true }
);
spy.assert_emitted(@array![(minter_address, expected_event_sale_close)]);
spy.assert_emitted(@array![(minter_address, expected_event_sold_out)]);
}
Expand Down
14 changes: 9 additions & 5 deletions tests/test_project.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,14 @@ fn test_project_burn_with_offsetter_role() {
project.burn(user_address, token_id, internal_value);

let expected_event_1155_transfer_single = helper_expected_transfer_event(
project_address, offsetter_address, user_address, Zeroable::zero(), array![token_id].span(), balance
project_address,
offsetter_address,
user_address,
Zeroable::zero(),
array![token_id].span(),
balance
);
spy.assert_emitted(@array![(project_address, expected_event_1155_transfer_single)]);

}

#[test]
Expand Down Expand Up @@ -280,7 +284,7 @@ fn test_project_batch_burn_with_offsetter_role() {
stop_cheat_caller_address(project_address);

start_cheat_caller_address(project_address, owner_address);
let cc_to_burn = cc_to_mint; // burn all the minted CC
let cc_to_burn = cc_to_mint; // burn all the minted CC
let num_vintages = vintages.get_num_vintages();
let mut cc_values: Array<u256> = Default::default();
let mut tokens: Array<u256> = Default::default();
Expand All @@ -304,7 +308,7 @@ fn test_project_batch_burn_with_offsetter_role() {
let expected_event_1155_transfer = helper_expected_transfer_event(
project_address, offsetter_address, user_address, Zeroable::zero(), token_ids, cc_to_burn
);
spy.assert_emitted(@array![(project_address, expected_event_1155_transfer)]);
spy.assert_emitted(@array![(project_address, expected_event_1155_transfer)]);
}

#[test]
Expand Down Expand Up @@ -699,4 +703,4 @@ fn test_set_approval_for_all() {
}
);
spy.assert_emitted(@array![(project_address, expected_event)]);
}
}

0 comments on commit 0fd63ff

Please sign in to comment.