Skip to content

Commit

Permalink
hardcode -> env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
vladbochok committed Feb 22, 2022
1 parent 074afc7 commit 0cbedec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/contracts/TokenGovernance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ contract TokenGovernance is ReentrancyGuard {
/// @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(_token != $(ZKSYNC_ADDRESS), "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
3 changes: 3 additions & 0 deletions contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const prodConfig = {
MAX_AMOUNT_OF_REGISTERED_TOKENS: 1023,
// PRIORITY_EXPIRATION: 101,
DUMMY_VERIFIER: false,
ZKSYNC_ADDRESS: process.env.CONTRACTS_CONTRACT_ADDR,
NEW_ADDITIONAL_ZKSYNC_ADDRESS: process.env.CONTRACTS_ADDITIONAL_ZKSYNC_ADDR,
UPGRADE_GATEKEEPER_ADDRESS: process.env.CONTRACTS_UPGRADE_GATEKEEPER_ADDR,

Expand All @@ -22,6 +23,7 @@ const testnetConfig = {
MAX_AMOUNT_OF_REGISTERED_TOKENS: 1023,
// PRIORITY_EXPIRATION: 101,
DUMMY_VERIFIER: false,
ZKSYNC_ADDRESS: process.env.CONTRACTS_CONTRACT_ADDR,
NEW_ADDITIONAL_ZKSYNC_ADDRESS: process.env.CONTRACTS_ADDITIONAL_ZKSYNC_ADDR,
UPGRADE_GATEKEEPER_ADDRESS: process.env.CONTRACTS_UPGRADE_GATEKEEPER_ADDR,

Expand All @@ -35,6 +37,7 @@ const testConfig = {
MAX_AMOUNT_OF_REGISTERED_TOKENS: 5,
PRIORITY_EXPIRATION: 101,
DUMMY_VERIFIER: true,
ZKSYNC_ADDRESS: process.env.CONTRACTS_CONTRACT_ADDR,
NEW_ADDITIONAL_ZKSYNC_ADDRESS: process.env.CONTRACTS_ADDITIONAL_ZKSYNC_ADDR,
UPGRADE_GATEKEEPER_ADDRESS: process.env.CONTRACTS_UPGRADE_GATEKEEPER_ADDR,

Expand Down

0 comments on commit 0cbedec

Please sign in to comment.