Skip to content

Conversation

friedger
Copy link
Collaborator

@friedger friedger commented Sep 15, 2025

This PR

The example fails until a new npm package was released

moodmosaic
moodmosaic previously approved these changes Sep 15, 2025
Copy link

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

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

LGTM

@friedger
Copy link
Collaborator Author

replaced #9

Copy link

@Copilot Copilot AI left a 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 of functionAnnotations.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.

@MarvinJanssen
Copy link
Member

Great!

@friedger
Copy link
Collaborator Author

Waiting on a fix of stx-labs/clarinet#1985 to make the tests pass

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.

caller with address fails on simple tests mine-blocks-before does not work

3 participants