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

Bagel refactor #5

Merged
merged 10 commits into from
Jan 9, 2025
Merged

Bagel refactor #5

merged 10 commits into from
Jan 9, 2025

Conversation

bagelface
Copy link
Collaborator

  • Fix tests
  • Refactor core functionality, variables, errors, functions, etc.
  • Add NatSpec comments
  • Bump Solidity version

This was linked to issues Dec 26, 2024
Copy link
Contributor

@RonTuretzky RonTuretzky left a comment

Choose a reason for hiding this comment

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

Have not gone over tests yet, will follow up

foundry.toml Show resolved Hide resolved
* @notice Simple implementation of a rotating savings and credit association (ROSCA) for ERC20 tokens
* @author Breadchain Collective
* @author @RonTuretzky
* @author @bagelface
Copy link
Contributor

Choose a reason for hiding this comment

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

on the YD contract everyone has their ENS, wdyt our convention should be for tagging authors?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ya i personally like ENS, i think we should just put it however the author requests. do you want me to use your ENS for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if you let me know which ENS to use for you i will change. i changed mine

src/contracts/SavingCircles.sol Outdated Show resolved Hide resolved
src/contracts/SavingCircles.sol Outdated Show resolved Hide resolved
Comment on lines +122 to +123
if (_circle.owner != msg.sender) {
if (!isMember[_id][msg.sender]) revert NotMember();
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the value of having access control here for the circle members as opposed to permissionless?

My concern is that practically what will happen is we /chain coop will have to decommission these, not the members themselves...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i usually like to avoid "godmode" functions, but if we think we need it we can add it. it just gives the circle members complete control which is a good or bad thing depending on perspective

block.timestamp < circles[_id].circleStart
|| block.timestamp >= circles[_id].circleStart + (circles[_id].depositInterval * (circles[_id].currentIndex + 1))
|| block.timestamp >= circles[_id].circleStart + (circles[_id].depositInterval * circles[_id].maxDeposits)
|| balances[_id][_member] + _value > circles[_id].depositAmount
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if allowing flexibility in the deposit amount instead of only allowing the full amount contributes to ux or makes it more confusing.. thoughts @diterra-code ?

error TransferFailed();

// External functions (state-changing)
function initialize(address owner) external;
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't the wonderland convention to put the natspec here and inheritdoc the contract?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh idk, is it? seems sort of strange but if that's convention i can change it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fwiw i personally dont really like that convention

@bagelface bagelface merged commit ce8a774 into dev Jan 9, 2025
6 checks passed
@bagelface bagelface deleted the bagel-refactor branch January 9, 2025 18:52
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.

Functional V1 Implementation Add NatSpec comments
2 participants