Skip to content

Commit 3162450

Browse files
committed
chore: add uint256 convert to quantity
1 parent 7a213a5 commit 3162450

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contracts/core/SharesFactoryV1.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ contract SharesFactoryV1 is Ownable2Step, ReentrancyGuard {
309309
(, uint8 curveType) = getShare(shareId);
310310
uint256 fromSupply = IShare(ERC1155).shareFromSupply(shareId);
311311
uint256 actualReferralFeePercent = referral != address(0) ? referralFeePercent : 0;
312-
require(fromSupply + quantity <= type(uint32).max, "Exceeds max supply");
312+
require(fromSupply + uint256(quantity) <= type(uint32).max, "Exceeds max supply");
313313

314314
buyPrice = getSubTotal(SafeCastLib.toUint32(fromSupply), quantity, curveType);
315315
referralFee = (buyPrice * actualReferralFeePercent) / 1 ether;

0 commit comments

Comments
 (0)