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

floordiv error reported as variable not declared #4382

Open
AlbertoCentonze opened this issue Nov 29, 2024 · 0 comments
Open

floordiv error reported as variable not declared #4382

AlbertoCentonze opened this issue Nov 29, 2024 · 0 comments
Labels
needs triage needs triage

Comments

@AlbertoCentonze
Copy link
Contributor

What's your issue about?

MAX_TICKS: constant(int256) = 50

struct UserTicks:
    ticks: uint256[MAX_TICKS/2]

fails with the following error:

vyper.exceptions.UndeclaredDefinition: 'MAX_TICKS' has not been declared.

  contract "contracts/amm_original.vy:84", line 84:19 
       83 struct UserTicks:
  ---> 84     ticks: uint256[MAX_TICKS/2]
  ---------------------------^
       85

While the problem is that / should be replaced by //

@AlbertoCentonze AlbertoCentonze added the needs triage needs triage label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage needs triage
Projects
None yet
Development

No branches or pull requests

1 participant