hirosystems / clarinet

Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin.
https://hiro.so/clarinet
GNU General Public License v3.0
301 stars 133 forks source link

Manifest schema refactoring #554

Open lgalabru opened 2 years ago

lgalabru commented 2 years ago

Manifests schema could be improved / simplified / cleaned. Some rough ideas:

Before

[project]
name = "test"
authors = []
description = ""
telemetry = false
requirements = []
boot_contracts = ["costs", "pox", "pox-2", "lockup", "costs-2", "cost-voting", "bns"]

[project.cache_location]
path = "./.requirements"
[contracts.test]
contract_path = "contracts/test.clar"
clarity_version = 1
[repl.analysis]
passes = ["check_checker"]

[repl.analysis.check_checker]
strict = false
trusted_sender = false
trusted_caller = false
callee_filter = false

After

[project]
name = "test"
authors = []
description = ""
telemetry = false
cache_location = "./.cache"

[check_checker]
strict = false
trusted_sender = false
trusted_caller = false
callee_filter = false

[requirements]

[contracts.test]
path = "contracts/test.clar"
clarity_version = 2

Should also handle https://github.com/hirosystems/clarinet/issues/417, https://github.com/hirosystems/clarinet/issues/246

hugocaillard commented 2 years ago

@lgalabru So we want to remove boot_contracts and always load all?

lgalabru commented 2 years ago

Correct, letting the developers deal with boot contracts is a footgun, it became pretty easy to mess things up, with the clarity versions, different costs, different pox.