Skip to content

Commit

Permalink
yep
Browse files Browse the repository at this point in the history
  • Loading branch information
waynehoover committed Dec 1, 2023
1 parent 5b7f1c1 commit 7471341
Show file tree
Hide file tree
Showing 16 changed files with 1,130 additions and 73 deletions.
54 changes: 54 additions & 0 deletions broadcast/Quest.s.sol/11155111/run-1701415478.json

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions broadcast/Quest.s.sol/11155111/run-1701415490.json

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions broadcast/Quest.s.sol/11155111/run-1701415519.json

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions broadcast/Quest.s.sol/11155111/run-1701415670.json

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions broadcast/Quest.s.sol/11155111/run-1701415684.json

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions broadcast/Quest.s.sol/11155111/run-1701415712.json

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions broadcast/Quest.s.sol/11155111/run-latest.json

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1701414274.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1701414293.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1701414312.json

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1701415329.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1701415336.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions broadcast/QuestFactory.s.sol/11155111/run-1701415365.json

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions broadcast/QuestFactory.s.sol/11155111/run-latest.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion contracts/Quest1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ contract Quest1155 is ERC1155Holder, ReentrancyGuardUpgradeable, PausableUpgrade
if (IERC1155(rewardToken).balanceOf(address(this), tokenId) < totalParticipants) {
revert InsufficientTokenBalance();
}
if (address(this).balance < this.maxProtocolReward()) revert InsufficientETHBalance();
queued = true;
emit Queued(block.timestamp);
}
Expand Down
2 changes: 0 additions & 2 deletions contracts/QuestFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,12 @@ contract QuestFactory is Initializable, LegacyStorage, OwnableRoles, IQuestFacto
) external payable nonReentrant returns (address) {
Quest storage currentQuest = quests[questId_];

if (msg.value < totalQuestNFTFee(totalParticipants_)) revert MsgValueLessThanQuestNFTFee();
if (currentQuest.questAddress != address(0)) revert QuestIdUsed();

address payable newQuest =
payable(erc1155QuestAddress.cloneDeterministic(keccak256(abi.encodePacked(msg.sender, block.chainid, block.timestamp))));
currentQuest.questAddress = address(newQuest);
currentQuest.totalParticipants = totalParticipants_;
currentQuest.questAddress.safeTransferETH(msg.value);
currentQuest.questType = "erc1155";
currentQuest.questCreator = msg.sender;
IQuest1155Ownable questContract = IQuest1155Ownable(newQuest);
Expand Down

0 comments on commit 7471341

Please sign in to comment.