Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: fix decimal #163

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/constants.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

pub const CC_DECIMALS_MULTIPLIER: u256 = 1_000_000_000_000_000_000;
pub const MULTIPLIER_TONS_TO_MGRAMS: u256 = 1_000_000_000;
pub const CC_DECIMALS: u8 = 8;
pub const CC_DECIMALS: u8 = 9;

pub const IERC165_BACKWARD_COMPATIBLE_ID: felt252 = 0x80ac58cd;
pub const OLD_IERC1155_ID: felt252 = 0xd9b67a26;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_project.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ fn test_decimals() {
let project_contract = IProjectDispatcher { contract_address: project_address };
let project_decimals = project_contract.decimals();

assert(project_decimals == 8, 'Decimals should be 8');
assert(project_decimals == 9, 'Decimals should be 9');
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_vintage.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ fn test_get_cc_decimals() {
let vintages = IVintageDispatcher { contract_address: project_address };

let cc_decimals = vintages.get_cc_decimals();
assert(cc_decimals == 8, 'CC decimals should be 8');
assert(cc_decimals == 9, 'CC decimals should be 9');
}

/// update_vintage_status
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use openzeppelin::token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTr
/// Mock Data
///

pub const DEFAULT_REMAINING_MINTABLE_CC: u256 = 82500000000000;
pub const DEFAULT_REMAINING_MINTABLE_CC: u256 = 82_500_000_000_000;
pub const STARTING_YEAR: u32 = 2024;

pub fn get_mock_absorptions() -> Span<u256> {
Expand Down
Loading