Skip to content

Commit

Permalink
✅ update Metadata testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tekkac committed Mar 6, 2024
1 parent 4dd0688 commit 75693f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/tests/mocks/project.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,20 @@ mod ProjectMock {
fn get_absorptions(self: @ContractState, slot: u256) -> Span<u64> {
Default::default().span()
}

fn get_absorption(self: @ContractState, slot: u256, time: u64) -> u64 {
100 * 1_000_000
time * 1_000
}
fn get_current_absorption(self: @ContractState, slot: u256) -> u64 {
778 * 1_000_000
// 157_300001
41040_000001
}
fn get_final_absorption(self: @ContractState, slot: u256) -> u64 {
4096 * 1_000_000
410400_000000 // Karathuru
// 1573_000000 // BanegasFarm
}
fn get_project_value(self: @ContractState, slot: u256) -> u256 {
42_000 * 1_000_000
2_139_004_800000
}
fn get_ton_equivalent(self: @ContractState, slot: u256) -> u64 {
1_000_000
Expand Down Expand Up @@ -116,7 +119,7 @@ mod ProjectMock {
}

fn value_of(self: @ContractState, token_id: u256) -> u256 {
369 * 1_000_000
200 * 1_000000
}

fn slot_of(self: @ContractState, token_id: u256) -> u256 {
Expand Down
2 changes: 2 additions & 0 deletions src/tests/test_slot_metadata.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ fn test_construct_slot_uri() {
};

set_contract_address(project_address);
set_block_timestamp(1750425366);

let uri: Span<felt252> = metadata.construct_slot_uri(slot);
let mut uri_span = uri;

Expand Down

0 comments on commit 75693f4

Please sign in to comment.