New Default: Latest Epoch for Contract Development #1963
Replies: 2 comments 1 reply
-
|
Suggestion: Improve error message for epoch-related contract resolution When using This is misleading because the contract is added correctly—the issue is that the referenced contract was deployed in a later epoch than the one configured for my contract. Current behavior: Error message suggests the contract doesn't exist. Expected behavior: The error should detect this scenario and suggest:
Why this matters:
Workaround: Set Nota: Thank you @hugoclrd for kind help and support. |
Beta Was this translation helpful? Give feedback.
-
|
Bonus Feature idea: Have clarinet requirement add recursively resolve and add all transitive contract dependencies automatically. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
To encourage staying up-to-date with contract development and ensure consistency between local testing and production deployments, we've introduced a new default for contract epoch settings.
What's Changed
When creating a new contract with
clarinet contracts new <name>, you'll now get a contract configured with the'latest'epoch by default:Config.toml Example
Why This Matters
Consistency with Mainnet: When you deploy a contract on Mainnet, it automatically uses the latest epoch. Now your local testing environment will match this behavior by default, reducing surprises during deployment.
Stay Current: Using the latest epoch ensures you're developing with the newest Clarity features and improvements.
Customization Options
You can still specify a particular epoch version if needed (e.g.
epoch = 3.0)Migration
Existing contracts: This change only affects newly created contracts. Your existing contracts will continue to use their current epoch settings.
Upgrading existing contracts: If you want to update existing contracts to use the latest epoch, simply change the
epochvalue in yourClarinet.tomlfile.Beta Was this translation helpful? Give feedback.
All reactions