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
290 stars 129 forks source link

Allow to load custom boot contracts #1449

Open hugocaillard opened 1 month ago

hugocaillard commented 1 month ago

Context

Clarinet embeds a copy of the boot contracts. For stacks core developers, it would be useful to have the ability to load custom code instead.

Solution

Add on options to override boot contracts sources. In the Clarinet.toml, it should be possible to specify the path to the source file of a boot contract. This code would be used in place of the one embedded in clarinet. It could also be used to get the code coverage and therefore remove the need for https://github.com/hirosystems/clarinet/pull/1412, and achieve the same result in a more elegant way

[override_boot_contracts_source]
pox-4 = "./custom-boot-contracts/pox-4.clar"