Skip to content

Commit

Permalink
fix(contract): update participate event to include participate id
Browse files Browse the repository at this point in the history
  • Loading branch information
oyyblin committed Dec 1, 2024
1 parent 4532db3 commit 78db591
Show file tree
Hide file tree
Showing 5 changed files with 1,098 additions and 96 deletions.
4 changes: 2 additions & 2 deletions contracts/deployments/13505.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"RAFFLE": "0x4349F1d73237c8Eb43FC04A16CFf70261D0F1343"
}
"RAFFLE": "0xa895748Da144c81FaD5d368F01BD2eb88b9e3e5a"
}
3 changes: 3 additions & 0 deletions contracts/deployments/1625.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RAFFLE": "0xB1df48774E8e3FbFFF295A156d8D94240F6Ac63a"
}
2 changes: 1 addition & 1 deletion contracts/src/IRaffle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface IRaffle {
event VerifierUpdated(address verifier);
event VkeyUpdated(bytes32 vkey);
event DrandOracleUpdated(address drandOracle);
event Participate(uint64 questID, uint256 user, uint64 verifyID);
event Participate(uint256 participantID, uint64 questID, uint256 user, uint64 verifyID);
event CommitRandomness(uint64 questID, uint64 roundID, bytes32 randomness);
event Reveal(uint64 questID, uint32 participantCount, uint32 winnerCount, bytes32 randomness, bytes32 merkleRoot);

Expand Down
6 changes: 4 additions & 2 deletions contracts/src/Raffle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@ contract Raffle is IRaffle, Ownable2Step, Pausable, EIP712 {
BitMaps.set(verifyIds, _verifyID);

quest.participantCount++;
quest.participantIds[uint256(uint160(_user))] = quest.participantCount;

emit IRaffle.Participate(_questID, _user, _verifyID);
uint256 participantID = quest.participantCount;
quest.participantIds[uint256(uint160(_user))] = participantID;

emit IRaffle.Participate(participantID, _questID, _user, _verifyID);
}

/// @notice Commits the randomness for the quest.
Expand Down
Loading

0 comments on commit 78db591

Please sign in to comment.