Skip to content

Commit 20f8ead

Browse files
committed
chore: increase color options for nfts, update tests
1 parent ed8ec8a commit 20f8ead

File tree

2 files changed

+50
-4
lines changed

2 files changed

+50
-4
lines changed

src/base/token_uris/traits/color.cairo

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ pub mod colonizColors {
88
'#EAD7FF',
99
'#D9E0FF',
1010
'#F8C944',
11-
'#F4FFDC',
1211
'#FFE7F0',
1312
'#F3EAFF',
1413
'#ECF0FF',
@@ -20,10 +19,24 @@ pub mod colonizColors {
2019
'#575757',
2120
'#DBDBDB',
2221
'#000',
23-
'#E3F7FF',
2422
'#FF88A5',
2523
'#FFDFE7',
26-
'#FFCFEC'
24+
'#FFCFEC',
25+
'#FF7F50',
26+
'#0074D9',
27+
'#FF851B',
28+
'#2ECC40',
29+
'#39CCCC',
30+
'#B10DC9',
31+
'#85144B',
32+
'#3D9970',
33+
'#FF4136',
34+
'#111111',
35+
'#AA00FF',
36+
'#FF00A0',
37+
'#008080',
38+
'#D81B60',
39+
'#5D4037'
2740
];
2841

2942
let len: u256 = colors.len().try_into().unwrap();

tests/test_pot.cairo

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,40 @@ fn test_claim() {
236236
50,
237237
6300,
238238
4000
239-
)
239+
);
240+
241+
let claimee_bal = IERC20Dispatcher { contract_address: usdt_contract_address }
242+
.balance_of(ADDRESS2.try_into().unwrap());
243+
assert(claimee_bal == 50, 'claiming failed');
244+
}
245+
246+
#[test]
247+
fn test_user_eligibility() {
248+
let (pot_contract_address, usdt_contract_address) = __setup__();
249+
let pot_dispatcher = IPotDispatcher { contract_address: pot_contract_address };
250+
251+
let merkle_root: felt252 =
252+
1018745228276730910704891102790994956051553894193058494775844408792094808986;
253+
let merkle_proof: Array<felt252> = array![
254+
1761604568630620421740888441665833845656791646872009472483668397314975751449,
255+
1159441081249918702317256603203685015326534686061889545802973339878349767760
256+
];
257+
258+
let instance_id = create_instance(
259+
pot_contract_address, usdt_contract_address, 123, merkle_root, 70, 100, 6300, 300
260+
);
261+
262+
let is_eligible = pot_dispatcher
263+
.user_is_eligible(
264+
instance_id,
265+
2383128754053831016163744975954369849134384176671708002113475243500452325532
266+
.try_into()
267+
.unwrap(),
268+
0,
269+
merkle_proof.span()
270+
);
271+
272+
assert(is_eligible, 'user should be eligible');
240273
}
241274

242275
#[test]

0 commit comments

Comments
 (0)