-
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
TACo application refinements #145
Conversation
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 ✌️! I left a question more than a suggestion.
stakingProviderFromOperator[operator] = stakingProvider; | ||
info.operatorConfirmed = false; | ||
// TODO placeholder to notify Coordinator | ||
if (stakingProvider == address(0) || operator == oldOperator) { |
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.
Sorry if it's a dumb question, but why not manage this with a require
statement?
if (stakingProvider == address(0) || operator == oldOperator) { | |
require (stakingProvider != address(0) && operator != oldOperator); |
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.
it's not dumb question. Because there is no real point to fail in xchain txs, it will be just skipped and that's it. But some sanity check to decrease gas consumption we want to 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.
got it, thanks!
uint64 endCommitment; | ||
} | ||
|
||
uint256 public constant REWARD_PER_TOKEN_MULTIPLIER = 10 ** 4; |
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.
What does this constant represent? What's the multiplier? Is this something for precision?
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.
yeah, name is not perfect. Thing is we have variable called rewardPerToken
. With increase of precision now it's actually not per token but per 10000 tokens (that multiplier).
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.
REWARD_CALCULATION_MULTIPLIER
?
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.
hmm, this name suits better for FLOATING_POINT_DIVISOR
- ProxyAdmin | ||
- LynxTACoChildApplication: | ||
_rootApplication: $MockPolygonChild | ||
_minimumAuthorization: 40000000000000000000000 |
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.
Something to think about here is that the value used in root.yml
for the root application would need to match the value used here... 🤔 (cc @KPrasch )
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.
That's why we need a separate constants section or file
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.
Indeed. Now that it is a yml file, perhaps we can specify a dependent constants.yml file ... that allows for a dictionary of variables/values to be specified. I'm less familiar with yml spec.
…Root.setFxChildTunnel` methods
No description provided.