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

fix contract calls into clarity2 contracts #711

Merged
merged 2 commits into from
Dec 8, 2022

Conversation

hstove
Copy link
Contributor

@hstove hstove commented Dec 8, 2022

This is a fix for #709 - check out that issue for more details and a repro of the bug.

This PR does two things:

  • Adds costs-3 boot contract
    • I pulled the code in from stacks-blockchain and added it to various "default boot code" places, including in the project manifest
  • When making a contract-call? in clarity-repl, I set the epoch to 2.1.

The latter fix was the only thing that actually fixed the issue. The exact line of code is here: https://github.com/hstove/clarinet/blob/0ca1d66cb47e39763061a9017f7e45771938c896/components/clarity-repl/src/repl/session.rs#L593 . Without this line, my issue still fails.

One thing I noticed, via some debugging, was that my contract was being added to the Clarity DB with epoch "2.0" in tests, even though I have it specified as 2.1 in my Clarinet.toml. If that bug was fixed (which I haven't figured out), would that fix the bug as well?

Copy link
Contributor

@lgalabru lgalabru left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for this contribution @hstove!
As discussed off band, some additional adjustments are required, I'll merge this first patch and open a subsequent PR.

@lgalabru lgalabru merged commit aa771fa into hirosystems:develop Dec 8, 2022
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.

2 participants