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

Check-checker fine tuning: (asserts! (is-eq (contract-of trait-contract) ...) #820

Closed
lgalabru opened this issue Jan 12, 2022 · 1 comment · Fixed by hirosystems/chainhook#78
Assignees

Comments

@lgalabru
Copy link
Contributor

The check checker is raising a warning for the following contract, when it should catch that the trait is being untainted by the assert construct.

(define-trait my-trait
  (
    (my-method (uint) (response uint uint))  
  )
)

(define-data-var principal-check principal 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM)

(define-public (deposit (trait-contract <my-trait>))
  (begin
    (asserts! (is-eq (contract-of trait-contract) (var-get principal-check)) (err u0))
    (try! (as-contract (contract-call? trait-contract my-method u1)))
    (ok u1)
  )
)
obycode referenced this issue in hirosystems/chainhook Jan 13, 2022
obycode referenced this issue in hirosystems/chainhook Jan 13, 2022
blockstack-devops referenced this issue in hirosystems/chainhook Jan 13, 2022
# [0.21.0](v0.20.1...v0.21.0) (2022-01-13)

### Bug Fixes

* fix ast visitor traversal of contract-of expr ([d553e50](d553e50)), closes [#77](https://github.com/hirosystems/clarity-repl/issues/77)
* resolve CI failure for forks ([8152e4b](8152e4b))

### Features

* add 'filter' annotation ([4cebe6b](4cebe6b)), closes [#72](https://github.com/hirosystems/clarity-repl/issues/72)
@blockstack-devops
Copy link
Collaborator

🎉 This issue has been resolved in version 0.21.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lgalabru lgalabru transferred this issue from hirosystems/chainhook Feb 2, 2023
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 a pull request may close this issue.

3 participants