Skip to content

Commit

Permalink
Add additional level of protection
Browse files Browse the repository at this point in the history
  • Loading branch information
vladbochok committed Feb 18, 2022
1 parent de19ed6 commit 074afc7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/contracts/TokenGovernance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ contract TokenGovernance is ReentrancyGuard {
/// @notice If caller is not present in the `tokenLister` map payment of `listingFee` in `listingFeeToken` should be made.
/// @notice NOTE: before calling this function make sure to approve `listingFeeToken` transfer for this contract.
function addToken(address _token) external nonReentrant {
require(_token != address(0), "z1"); // Token should have a non-zero address
require(_token != 0xaBEA9132b05A70803a4E85094fD0e1800777fBEF, "z2"); // Address of the token cannot be the same as the address of the main zksync contract
require(governance.totalTokens() < listingCap, "can't add more tokens"); // Impossible to add more tokens using this contract
if (!tokenLister[msg.sender] && listingFee > 0) {
// Collect fees
Expand Down

0 comments on commit 074afc7

Please sign in to comment.