-
Notifications
You must be signed in to change notification settings - Fork 7
fix: use correct annotation object #20
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
replaced #9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issues with caller annotation handling by ensuring the correct annotation object is used throughout the codebase. The changes address bugs #19 and #8 while adding comprehensive test coverage for caller annotations using both wallet references and direct address formats.
- Fixes incorrect reference to
annotations.caller
instead offunctionAnnotations.caller
- Adds support for direct address format in caller annotations (e.g.,
'ST000000000000000000002AMW42H
) - Introduces comprehensive test coverage for caller annotation functionality
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/clarunit-generator.ts | Fixed bug using wrong annotation object and improved caller address handling |
tests/contracts/generator-tests/annotations_test.clar | New test contract demonstrating caller annotation functionality |
tests/contracts/parser-tests/simple-flow.clar | Added test case for caller annotation with direct address |
tests/contracts/parser-tests/all-annotations.clar | Added test function with direct address caller annotation |
tests/clarity-parser.test.ts | Added test assertion for parsing direct address caller annotations |
tests/clarity-parser-flow.test.ts | Added test verification for flow parsing with direct address caller |
tests/clarunit.test.ts | Basic test setup file for clarunit functionality |
example/tests/my-contract_test.clar | Example usage of direct address caller annotation |
deployments/default.simnet-plan.yaml | Configuration to include new test contract in deployment |
Clarinet.toml | Contract registration for new annotations test contract |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Great! |
Waiting on a fix of stx-labs/clarinet#1985 to make the tests pass |
This PR
The example fails until a new npm package was released