[Stacks 2.1] Consider defaulting to versioned-smart-contracts
after 2.1 hardfork
#1346
Milestone
versioned-smart-contracts
after 2.1 hardfork
#1346
Related to #1341
The above PR adds the capability to create and deserialize the new
versioned-smart-contracts
tx types, which is helpful for projects to upgrade to before the 2.1 fork so that codebases are prepared for the fork.However, the builder functions default to creating a Stacks 2.0 regular
smart-contract
tx type so that codebases don't create a bad tx type that won't work before the 2.1 fork.Once the 2.1 hardfork is live, this library should then publish a new version that defaults to
versioned-smart-contracts
in order to avoid a lot of developer confusion when Clarity2 features are used in the contract source code, but the tx fails when the explicitclarityVersion
arg is not specified.This would ensure the typical usage will just work before and after Stacks 2.1:
Alternatively,
makeContractDeploy(...)
could detect if 2.1 is live and use that for the default, but this would require an additional network call. And AFAIK there's currently not a great way to detect if 2.1 is live. Right now, it would involve something like:The first approach makes more sense to me, but I'm open to either or other suggestions.
The text was updated successfully, but these errors were encountered: