clarinet
clarinet copied to clipboard
Clarinet: Confusing NoSuchContract error when the epoch specified is the problem
Describe the bug
Write any clarity code using the SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.amm-swap-pool-v1-1
contract and a 2.1 epoch gives you an error: NoSuchContract("SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.amm-swap-pool-v1-1")
error. The error is confusing as the contract is added as a requirement but the epoch is wrong, it took me some time to understand and changing the epoch to 2.4
solved the issue.
Clarinet.toml:
[[project.requirements]]
contract_id = 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.amm-swap-pool-v1-1'
[contracts.test]
path = 'contracts/test.clar'
clarity_version = 2
epoch = 2.1
Expected behavior
Throw an error that the epoch in clarinet.toml is wrong.
@hugocaillard, can help with more information.