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

sBTC contract not correctly detected in requirements #1635

Closed
whoabuddy opened this issue Dec 26, 2024 · 2 comments
Closed

sBTC contract not correctly detected in requirements #1635

whoabuddy opened this issue Dec 26, 2024 · 2 comments

Comments

@whoabuddy
Copy link
Contributor

Describe the bug

I have sBTC in my project requirements but when I run clarinet check it says the contract doesn't exist. I can see it in my cache dir.

To Reproduce

Steps to reproduce the behavior:

  1. Add requirement to Clarinet.toml
[[project.requirements]]
contract_id = 'SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token'
  1. Reference from Clarity contract code
(try! (contract-call? 'SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token transfer amount tx-sender USABTC_CONTRACT none))
  1. Run clarinet check, tests, etc to see error
$ clarinet check
error: NoSuchContract("SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token")
  1. Double-check contents in cache dir:
$ ls .cache/requirements
SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-registry.clar  SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token.clar  SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.clar
SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-registry.json  SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token.json  SP3FBR2AGK5H9QBDH3EEN6DF8EK8JY7RX8QJ5SVTE.sip-010-trait-ft-standard.json

Expected behavior

I removed the local versions in favor of using requirements - expected it to work of course 😉

Screenshots

Typo on console.log in the template here fyi.

Environment (please complete the following information):

  • OS (version): Linux Mint
  • Clarinet version [e.g. 1.7.0]: clarinet 2.12.0
@hugocaillard
Copy link
Collaborator

I could be that your contract is deployed in an epoch lower than sBTC. Can you check that?

@whoabuddy
Copy link
Contributor Author

I could be that your contract is deployed in an epoch lower than sBTC. Can you check that?

That was 100% the problem, using 3.0 from here forward! 🙏

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in DevTools Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants