-
Notifications
You must be signed in to change notification settings - Fork 11
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
Adds fee model <-> allow list communication #271
Conversation
Co-authored-by: Manuel Montenegro <manuel@nucypher.com>
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.
Looks good to me
state == Coordinator.RitualState.DKG_TIMEOUT || | ||
state == Coordinator.RitualState.DKG_INVALID | ||
) { | ||
// Refund everything minus cost of renting cohort for a day |
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.
As mentioned in the call we don't need a fully functioning refund system in the first version but fine to have this here for later
require(msg.sender == address(coordinator), "Only coordinator can call process payment"); | ||
uint256 ritualCost = getRitualInitiationCost(numberOfProviders, duration); | ||
require(ritualCost > 0, "Invalid ritual cost"); | ||
totalPendingFees += ritualCost; |
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.
does this balance cover encryptor credits and the base fee?
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.
this is initial fee model, not yet subscription. so no credits or base fee, just flat rate
Co-authored-by: David Núñez <david@nucypher.com>
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.
LGTM!
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.
Nice work - 🎸 .
Left some minor suggestions.
@@ -12,7 +12,26 @@ interface IFeeModel { | |||
function currency() external view returns (IERC20); | |||
|
|||
function getRitualInitiationCost( | |||
address[] calldata providers, | |||
uint256 numberOfProviders, |
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.
👍
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Considering many follow up changes, skip this as separate PR and review directly #272 |
Type of PR:
Required reviews:
What this does:
Adds calls to fee model from allow list. Small PR but finishes (I hope) basic architecture of communication
Issues fixed/closed:
Refs #264
Why it's needed:
Notes for reviewers:
Based on #265