-
Notifications
You must be signed in to change notification settings - Fork 0
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
20240207 invite as org #87
Conversation
that seems to be now 🎉 |
function inviteHumanAsOrganization(address _human, address payable _donationReceiver) external payable { | ||
require(msg.value > MINIMUM_DONATION, "Donation must be at least 0.1 xDai."); | ||
require(isOrganization(msg.sender), "Only organizations can invite."); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require(msg.sender != _donationReceiver, "Can't donate to yourself"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes it at least a little bit more expensive to perpetually invite people with the same funds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I agree, but you can always send to yourself over one-hop, so I don't know if we should block it. we already know that the donation is a reputation requirement for it to have meaning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the requirement with comment
src/hub/Hub.sol
Outdated
|
||
// set the last mint time to the current timestamp for invited human | ||
// and register the v1 Circles contract status | ||
address v1CirclesStatus = _avatarV1CirclesStatus(_human); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's refactor the common parts of inviteHuman
and inviteHumanAsOrganization
into an _inviteHuman function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I wanted to, but then thought I was overthinking it. Ill quickly do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turned out it was well worth the refactoring!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small refactoring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fipf
I ll rebase this once the other PR is also on develop, thanks @jaensen / ✅ done