Skip to content

Test custom PoX contracts in simnet #1449

@hugoclrd

Description

@hugoclrd

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.

It should be possible to load custom code for a given boot contract and/or add custom boot contracts.

Not that the pox contract for instance isn't just a refular boot contract, it's rather a piece of the clarity-vm that happens to be written in Clarity. For instance, the active PoX contract will impact the result of the (stx-account) method

Solution idea

Add an option 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 #1412, and achieve the same result in a more elegant way

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

Other solutions

Before starting it, we have to make sur that the idea suggested above is good enough to achieve the expected goal. Discuss with blockchain team (@obycode @kantai)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

👀 In Review

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions