Skip to content

Commit

Permalink
dump events for crazy verbose contract reads
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPereira committed Nov 30, 2023
1 parent ff56d63 commit 00f632e
Show file tree
Hide file tree
Showing 3 changed files with 264 additions and 132 deletions.
26 changes: 13 additions & 13 deletions packages/hardhat/contracts/Market.sol
Original file line number Diff line number Diff line change
Expand Up @@ -357,19 +357,19 @@ contract Market is VRFConsumerBaseV2, AutomationCompatibleInterface, Ownable {
}

// emit event with each players updated total assets
for (uint i = 0; i < players.length; i++) {
address player = players[i];
uint256 totalAssets = lowRiskVault.maxWithdraw(player) +
mediumRiskVault.maxWithdraw(player) +
highRiskVault.maxWithdraw(player) +
token.balanceOf(player);
emit PlayerTotalAssetUpdate(
currentContest.number,
currentRound.number,
player,
totalAssets
);
}
// for (uint i = 0; i < players.length; i++) {
// address player = players[i];
// uint256 totalAssets = lowRiskVault.maxWithdraw(player) +
// mediumRiskVault.maxWithdraw(player) +
// highRiskVault.maxWithdraw(player) +
// token.balanceOf(player);
// emit PlayerTotalAssetUpdate(
// currentContest.number,
// currentRound.number,
// player,
// totalAssets
// );
// }
}

/** Uses random value to distribute/take tokens to/from the vaults
Expand Down
2 changes: 0 additions & 2 deletions packages/nextjs/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ export const Footer = () => {
args: [account.address],
});

console.log("userGoldBalance", userGoldBalance);

return (
<div className="min-h-0 py-5 px-1 mb-11 lg:mb-0">
<div>
Expand Down
Loading

0 comments on commit 00f632e

Please sign in to comment.