Closed sweep-ai[bot] closed 1 year ago
GitHub actions yielded the following error.
Oh no! 💥 💔 💥
3 files would be reformatted, 26 files would be left unchanged.
##[error]Process completed with exit code 1.
The command that failed is python -m black --check .
.
This is likely a linting or type-checking issue with the source code. Update the code the changes and avoid modifying the existing tests.
I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.
Description
This PR refactors the
BallotManager.sol
contract to use an array of structs instead of a mapping of strings to structs. It also updates related code in the client-side application to accommodate the changes.Summary of Changes
BallotManager.sol
:ballots
mapping to an array of structs.ballots
mapping to use the new array._ballotId
from string to uint32.client_code/forms/routes/ballot/Create/__init__.py
:ballotId
argument when creating a new ballot.client_code/model.py
:Ballot
class to remove theuuid
argument and generate theuuid
internally based on the index in the array.client_code/services/storage.py
:ScrollStore
class to reflect the changes inBallotManager.sol
andclient_code/model.py
.These changes ensure that the
BallotManager.sol
contract uses an array of ballots for better efficiency and consistency. The client-side application is updated to handle the changes and maintain compatibility with the updated contract structure.Fixes #74.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.