Skip to content

Commit 5e785a2

Browse files
committed
migrate nft_list lib
1 parent 3947664 commit 5e785a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vlayer/ethereum/circuits/lib/src/nft_list.nr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ mod mainnet {
1717
]);
1818
let VALUE_INDEX = 1;
1919

20-
assert(bytes32_to_field(token_id) <= BORED_APE_YACHT_CLUB_MAX_TOKEN_ID, "Token ID is too high");
20+
assert(bytes32_to_field(token_id) as u32 <= BORED_APE_YACHT_CLUB_MAX_TOKEN_ID, "Token ID is too high");
2121
let owner_slot = dynamic_array_with_precalculated_slot(BORED_APE_YACHT_CLUB_TOKEN_OWNERS_INNER_ENTRIES_SLOT, 2, bytes32_to_field(token_id));
2222
struct_slot(owner_slot, VALUE_INDEX)
2323
},
@@ -34,7 +34,7 @@ mod mainnet {
3434
let CRYPTO_PUNK_MAX_TOKEN_ID: u32 = 9999;
3535
let CRYPTO_PUNK_TOKEN_OWNERS_INNER_ENTRIES_SLOT = U256::from_field(10);
3636

37-
assert(bytes32_to_field(token_id) <= CRYPTO_PUNK_MAX_TOKEN_ID, "Token ID is too high");
37+
assert(bytes32_to_field(token_id) as u32 <= CRYPTO_PUNK_MAX_TOKEN_ID, "Token ID is too high");
3838
mapping(CRYPTO_PUNK_TOKEN_OWNERS_INNER_ENTRIES_SLOT, token_id)
3939
},
4040
chain_id: chain_id::MAINNET
@@ -62,7 +62,7 @@ mod sepolia {
6262
]);
6363
let VALUE_INDEX = 1;
6464

65-
assert(bytes32_to_field(token_id) <= BORED_APE_YACHT_CLUB_MAX_TOKEN_ID, "Token ID is too high");
65+
assert(bytes32_to_field(token_id) as u32 <= BORED_APE_YACHT_CLUB_MAX_TOKEN_ID, "Token ID is too high");
6666
let owner_slot = dynamic_array_with_precalculated_slot(BORED_APE_YACHT_CLUB_TOKEN_OWNERS_INNER_ENTRIES_SLOT, 2, bytes32_to_field(token_id));
6767
struct_slot(owner_slot, VALUE_INDEX)
6868
},

0 commit comments

Comments
 (0)