Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wallet balance discrepancy #211

Closed

Conversation

GIgako19929
Copy link

@GIgako19929 GIgako19929 commented Jan 14, 2025

Fixes #194

Add wallet balance functionality to src/contracts/Associations.sol.

  • State Variable

    • Add walletBalance to store the wallet balance.
  • Constructor

    • Initialize walletBalance to 0.
  • Event

    • Add WalletBalanceUpdated event to emit when the wallet balance is updated.
  • Functions

    • Add getWalletBalance to return the wallet balance.
    • Add updateWalletBalance to update the wallet balance and emit WalletBalanceUpdated event.

For more details, open the Copilot Workspace session.

Fixes naddison36#194

Add wallet balance functionality to `src/contracts/Associations.sol`.

* **State Variable**
  - Add `walletBalance` to store the wallet balance.

* **Constructor**
  - Initialize `walletBalance` to 0.

* **Event**
  - Add `WalletBalanceUpdated` event to emit when the wallet balance is updated.

* **Functions**
  - Add `getWalletBalance` to return the wallet balance.
  - Add `updateWalletBalance` to update the wallet balance and emit `WalletBalanceUpdated` event.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/naddison36/sol2uml/issues/194?shareId=XXXX-XXXX-XXXX-XXXX).
@GIgako19929
Copy link
Author

This pull request includes changes to the Associations contract in src/contracts/Associations.sol to add functionality for tracking and updating a wallet balance.

The most important changes include:

  • Added a new state variable walletBalance to store the wallet balance.
  • Introduced a new event WalletBalanceUpdated to signal when the wallet balance is updated.
  • Added a getter function getWalletBalance to retrieve the current wallet balance.
  • Added a function updateWalletBalance to update the wallet balance and emit the WalletBalanceUpdated event.

Copy link
Author

@GIgako19929 GIgako19929 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/ True
1 participant