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

Address internal review comments #74

Merged
merged 12 commits into from
Jan 12, 2024
Merged

Address internal review comments #74

merged 12 commits into from
Jan 12, 2024

Conversation

deuszx
Copy link
Collaborator

@deuszx deuszx commented Jan 10, 2024

No description provided.

krzysztofziobro and others added 7 commits January 4, 2024 14:04
It was used only in owner_withdraw_token(reward_token) and we can fail
the whole txn there if reward_token.balance_of turns out to be
reverting. This is not blocking any loop from execution, since there's
just one specific token argument.
if reward_rate == 0 {
return Err(FarmError::InvalidFarmStartParams);
}
.ok_or(FarmError::ArithmeticError(MathError::DivByZero(3)))?;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now we allow for zero reward rates for some tokens - i.e. there needs to exist at least one reward token with positive reward rate.

farm/contract/lib.rs Outdated Show resolved Hide resolved
farm/contract/lib.rs Show resolved Hide resolved
farm/contract/lib.rs Outdated Show resolved Hide resolved
farm/contract/lib.rs Outdated Show resolved Hide resolved
farm/contract/lib.rs Outdated Show resolved Hide resolved
@deuszx
Copy link
Collaborator Author

deuszx commented Jan 11, 2024

@krzysztofziobro PTAL one more time.

farm/trait/lib.rs Outdated Show resolved Hide resolved
farm/trait/lib.rs Outdated Show resolved Hide resolved
@deuszx deuszx changed the base branch from kz/farm-review to main January 12, 2024 12:36
@deuszx deuszx dismissed krzysztofziobro’s stale review January 12, 2024 12:36

The base branch was changed.

@deuszx deuszx marked this pull request as ready for review January 12, 2024 12:36
Copy link
Contributor

@krzysztofziobro krzysztofziobro left a comment

Choose a reason for hiding this comment

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

Good

farm/trait/lib.rs Outdated Show resolved Hide resolved
Co-authored-by: Krzysztof Ziobro <[email protected]>
@deuszx deuszx merged commit e0ad01b into main Jan 12, 2024
1 check passed
@deuszx deuszx deleted the farms-internal-audits branch January 12, 2024 12:57
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.

2 participants