Skip to content

Commit d8cf6c2

Browse files
author
Ludo Galabru
committed
wip README
1 parent c3fd59b commit d8cf6c2

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

README.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,15 +414,46 @@ $ clarinet integrate
414414

415415
Make sure that you have a working installation of Docker running locally.
416416

417-
### Deploy contracts to Testnet
417+
### Interacting with contracts deployed on Mainnet
418418

419-
You can use Clarinet to deploy your contracts to the public Testnet environment for testing and
420-
evaluation on a blockchain. Use the following command:
419+
Composition and interactions between protocols and contracts are one of the key innovations in blockchains. Clarinet was designed to handle this sort of interactions.
420+
421+
Before refering to contracts deployed on Mainnet, they should be explicitily be listed as a `requirement` in the manifest `Clarinet.toml`:
422+
423+
```toml
424+
[project]
425+
name = "my-project"
426+
requirements = [
427+
"SP2KAF9RF86PVX3NEE27DFV1CQX0T4WGR41X3S45C.bitcoin-whales.payout"
428+
]
429+
430+
```
431+
432+
From there, clarinet will be able to reconciliate the `contract-call` present in your local contracts, download and cache a copy of the required contracts, and use them during the execution of your tests suites, and all the different features available in `clarinet`.
433+
434+
When deploying your protocol to Devnet / Testnet, for the contracts involving requirements, the setting `remap_requirements` in your deployment plans must be set.
435+
436+
Before Devnet / Testnet deployments, your contracts will be automatically remapped on the fly to point to the duplicated requirements deployed by an account that you control.
437+
438+
### Deploy contracts to Devnet / Testnet / Mainnet
439+
440+
You can use Clarinet to publish your contracts to the public Testnet environment for testing and evaluation on a blockchain.
441+
442+
The first step is to generate a deployment plan, with the following command:
443+
444+
```bash
445+
$ clarinet deployment generate --mainnet
446+
```
447+
448+
After **cautiously** reviewing (and updating if needed) the generated plan, you can use the command:
421449

422450
```bash
423-
$ clarinet contract publish --testnet
451+
$ clarinet deployment apply -p <path-to-plan.yaml>
424452
```
425453

454+
which will handle the deployments of your contracts, according to the plan.
455+
456+
426457
### Use Clarinet in your CI workflow as a GitHub Action
427458

428459
Clarinet can be used in GitHub Actions as a step of your CI workflows.

0 commit comments

Comments
 (0)