Skip to content

Commit

Permalink
fix(topupcredit.sol): add onlyOnwer modifier
Browse files Browse the repository at this point in the history
add onlyOwner modifier to airdrop/airdropTo in TopupCredit.sol
  • Loading branch information
chaosma committed Sep 13, 2022
1 parent f6caf66 commit ee0c8a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/contracts/TopupCredit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ contract TopupCredit is ERC20, Ownable {
return _decimals;
}

function airdropTo(address account, uint256 amount) public {
function airdropTo(address account, uint256 amount) public onlyOwner {
require(amount < MAXIMUM_AIRDROP_AMOUNT);
_mint(account, amount);
}

function airdrop(uint256 amount) public {
function airdrop(uint256 amount) public onlyOwner {
require(amount < MAXIMUM_AIRDROP_AMOUNT, "amount exceed maximum limit");
_mint(msg.sender, amount);
}
Expand Down

0 comments on commit ee0c8a6

Please sign in to comment.