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

CCIP-4703: Adding check for ChainFeeUpdates field #410

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

b-gopalswami
Copy link
Collaborator

Added missing check for ChainFeeUpdates field.

The review comment asks to check for non-positive value on DataAvailableFee field but I believe that can be zero when it is EVM chain so keeping that check for only non-negative values. Only if it is L2 chain, it should be non-positive.

return fmt.Errorf("nil or non-positive %s", "execution fee price")
}

if update.ChainFee.DataAvFeePriceUSD == nil || update.ChainFee.DataAvFeePriceUSD.Cmp(zero) < 0 {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe this DataAvFeePriceUSD might be zero for EVM chain and shouldn't be zero for L2 chains. Is that right? If at all we can know the given chain is L2, then we can add additional check here.

Copy link

Metric cl33-07 main
Coverage 76.3% 76.5%

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.

1 participant