Skip to content

Commit

Permalink
Code423n4 #82, check nfthub set before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
Splidge committed Jun 21, 2021
1 parent cb84f08 commit 5147a36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/RCFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ contract RCFactory is Ownable, NativeMetaTransaction, IRCFactory {
) external returns (address) {
address _creator = msgSender();

// check nfthub has been set
require(address(nfthub) != address(0), "Nfthub not set");

// check sponsorship
require(
_sponsorship >= sponsorshipRequired,
Expand Down Expand Up @@ -603,7 +606,6 @@ contract RCFactory is Ownable, NativeMetaTransaction, IRCFactory {
});

// create the NFTs
require(address(nfthub) != address(0), "Nfthub not set");
for (uint256 i = 0; i < _tokenURIs.length; i++) {
uint256 _tokenId = i + totalNftMintCount;
require(
Expand Down

0 comments on commit 5147a36

Please sign in to comment.