Skip to content

Commit 9e8004e

Browse files
committed
chore: clarify casting safety
Signed-off-by: Tomás Migone <[email protected]>
1 parent 99f215c commit 9e8004e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/subgraph-service/contracts/SubgraphService.sol

+1
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ contract SubgraphService is
478478
address indexer = _signedRav.rav.serviceProvider;
479479

480480
// Check that collectionId (256 bits) is a valid address (160 bits)
481+
// collectionId is expected to be a zero padded address so it's safe to cast to uint160
481482
require(
482483
uint256(_signedRav.rav.collectionId) <= type(uint160).max,
483484
SubgraphServiceInvalidCollectionId(_signedRav.rav.collectionId)

0 commit comments

Comments
 (0)