From 4ae35cba0f178566e80f4d8c5a37da309f085ad8 Mon Sep 17 00:00:00 2001 From: 0xb337r007 <0xe4e5@proton.me> Date: Mon, 12 Jun 2023 13:27:56 +0200 Subject: [PATCH] check addresses and amounts lengths --- contracts/mvp/CommunityERC20.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contracts/mvp/CommunityERC20.sol b/contracts/mvp/CommunityERC20.sol index d674722..f1b4984 100644 --- a/contracts/mvp/CommunityERC20.sol +++ b/contracts/mvp/CommunityERC20.sol @@ -38,6 +38,8 @@ contract CommunityERC20 is * */ function mintTo(address[] memory addresses, uint256[] memory amounts) external onlyOwner { + require(addresses.length == amounts.length, "WRONG_LENGTHS"); + for (uint256 i = 0; i < addresses.length; i++) { uint256 amount = amounts[i]; require(totalSupply() + amount <= maxSupply, "MAX_SUPPLY_REACHED");