1.2.0 • Published 6 months ago

@pact-toolbox/prelude v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@pact-toolbox/preludes

Streamlines the downloading and deployment of standard Kadena contracts.

Table of Contents

Introduction

The @pact-toolbox/preludes module provides utilities for managing the downloading and deployment of standard Kadena contracts, known as preludes. This package aims to simplify the process of handling contract dependencies and ensuring they are properly deployed to a Kadena network.

Installation

To install the package, run:

npm install @pact-toolbox/preludes

Usage

Downloading Preludes

You can download the necessary preludes by using the downloadPreludes function. This function resolves and downloads all specified preludes based on the provided configuration.

Example:

import { downloadAllPreludes } from "@pact-toolbox/preludes";
import { PactToolboxClient } from "@pact-toolbox/runtime";

const myPactToolboxClient = new PactToolboxClient();
const config = {
  contractsDir: "./contracts",
  preludes: ["kadena/chainweb", "kadena/marmalade"],
  client: myPactToolboxClient,
};

await downloadAllPreludes(config);

Deploying Preludes

After downloading the preludes, you can deploy them using the deployPreludes function. This function ensures that all resolved preludes are deployed to the Kadena network.

Example:

import { deployPreludes } from "@pact-toolbox/preludes";
import { PactToolboxClient } from "@pact-toolbox/runtime";

const myPactToolboxClient = new PactToolboxClient();
const config = {
  contractsDir: "./contracts",
  preludes: ["kadena/chainweb", "kadena/marmalade"],
  client: myPactToolboxClient,
};

await deployPreludes(config);
1.2.0

6 months ago

1.1.0

6 months ago

1.0.0

6 months ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago