Skip to content

Commit

Permalink
Merge pull request #30 from sushiswap/fix/improved-token-factory
Browse files Browse the repository at this point in the history
Fix/improved token factory
  • Loading branch information
levx-me committed Aug 24, 2021
2 parents 45cff7e + b2e9b84 commit 7cb8fae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contracts/TokenFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ contract TokenFactory is ProxyFactory, Ownable, ITokenFactory {
return (_operationalFeeRecipient, _operationalFee);
}

// This function should be called with a proper param by a multi-sig `owner`
function setBaseURI721(string memory uri) external override onlyOwner {
baseURI721 = uri;
}

// This function should be called with a proper param by a multi-sig `owner`
function setBaseURI1155(string memory uri) external override onlyOwner {
baseURI1155 = uri;
}
Expand Down Expand Up @@ -242,6 +244,7 @@ contract TokenFactory is ProxyFactory, Ownable, ITokenFactory {
}

function isNFT721(address query) external view override returns (bool result) {
if(query == address(0)) return false;
for (uint256 i = _targets721.length; i >= 1; i--) {
if (_isProxy(_targets721[i - 1], query)) {
return true;
Expand Down Expand Up @@ -275,6 +278,7 @@ contract TokenFactory is ProxyFactory, Ownable, ITokenFactory {
}

function isNFT1155(address query) external view override returns (bool result) {
if(query == address(0)) return false;
for (uint256 i = _targets1155.length; i >= 1; i--) {
if (_isProxy(_targets1155[i - 1], query)) {
return true;
Expand Down Expand Up @@ -309,6 +313,7 @@ contract TokenFactory is ProxyFactory, Ownable, ITokenFactory {
}

function isSocialToken(address query) external view override returns (bool result) {
if(query == address(0)) return false;
for (uint256 i = _targetsSocialToken.length; i >= 1; i--) {
if (_isProxy(_targetsSocialToken[i - 1], query)) {
return true;
Expand Down

0 comments on commit 7cb8fae

Please sign in to comment.