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

Read-only function in requirement being classified as a public method #1234

Open
lgalabru opened this issue Oct 27, 2023 · 3 comments
Open
Labels
bug Something isn't working

Comments

@lgalabru
Copy link
Contributor

Reproducer:

In a new project add the following requirement:

clarinet requirements add SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2

Then create a contract with

(define-read-only (contract-call-literal-ok)
    (ok (contract-call? 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2 new 0x none))

(define-constant hk-cursor-v2 'SP2J933XB2CP2JQ1A4FGN8JA968BBG3NK3EKZ7Q9F.hk-cursor-v2)

(define-public (contract-call-constant-ok)
    (ok (contract-call? hk-cursor-v2 new 0x none))

(define-read-only (contract-call-constant-nok)
    (ok (contract-call? hk-cursor-v2 new 0x none))
@lgalabru
Copy link
Contributor Author

Error experienced in both clarinet check and vsce:

error: expecting read-only statements, detected a writing operation

@hugocaillard hugocaillard added the bug Something isn't working label Nov 13, 2023
@hugocaillard hugocaillard moved this from 🆕 New to 📋 Backlog in DevTools Nov 13, 2023
@MicaiahReid
Copy link
Contributor

Blocked by stacks-network/stacks-core#4369

@hugocaillard
Copy link
Collaborator

I'm removing this issue from the current iteration

@MicaiahReid MicaiahReid removed their assignment May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants