-
Notifications
You must be signed in to change notification settings - Fork 46
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
farm position functionality #760
Conversation
Contract comparison - from 711aede to 3cf4458
|
let farm_token_mapper = sc.farm_token(); | ||
let token_attributes: FarmTokenAttributes<<Self::FarmSc as ContractBase>::Api> = | ||
farm_token_mapper.get_token_attributes(farm_position.token_nonce); |
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.
Getting attributes a second time, first time on line 204. Why not give them as argument?
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.
We use decrease_user_farm_position
in other contexts (i.e. BaseExitFarmModule
).
I think the improvement here would be less than the expense in exit_farm_base
: we would have to get farm_token
from storage and then get_token_attributes
.
claim boosted in merge endpoints
remove exit amount parameter from farms
Moved try_set_farm_position_migration_nonce to common modules to remove code duplication.
audit fixes (2)
farm position functionality tests
farm position first audit fixes
claimBoostedRewards
endpoint, which allows any user to claim the boosted rewards for himself or for another user