Connection configuration. Factory for Chain and Agent objects.

Hierarchy

Constructors

  • Parameters

    • options: Partial<ConnectConfig> & Partial<{
          build: Partial<{
              builder: string;
              caching: boolean;
              dockerImage: "ghcr.io/hackbg/fadroma:master";
              dockerSocket: "/var/run/docker.sock";
              dockerfile: string;
              noFetch: false;
              outputDir: string;
              outputGid: undefined | string;
              outputUid: undefined | string;
              podman: false;
              preferredRemote: undefined | string;
              quiet: false;
              raw: false;
              script: string;
              sshAuthSocket: undefined | string;
              toolchain: "";
              verbose: false;
              workspace: string;
          }>;
          deploy: Partial<{
              format: "v1";
              multisig: false;
              storePath: null | string;
          }>;
          devnet: Partial<Partial<Devnet>>;
          upload: Partial<{
              reupload: false;
              uploadState: null | string;
              uploader: "FS";
          }>;
      }> = {}
    • Optional environment: Environment

    Returns Config

Properties

agentName: string = ...

Name of stored mnemonic to use for authentication (currently devnet only)

build: {
    builder: string;
    caching: boolean;
    dockerImage: "ghcr.io/hackbg/fadroma:master";
    dockerSocket: "/var/run/docker.sock";
    dockerfile: string;
    noFetch: false;
    outputDir: string;
    outputGid: undefined | string;
    outputUid: undefined | string;
    podman: false;
    preferredRemote: undefined | string;
    quiet: false;
    raw: false;
    script: string;
    sshAuthSocket: undefined | string;
    toolchain: "";
    verbose: false;
    workspace: string;
} = ...

Build options.

Type declaration

  • builder: string

    Builder to use

  • caching: boolean

    Whether to enable caching and reuse contracts from artifacts directory.

  • dockerImage: "ghcr.io/hackbg/fadroma:master"

    Docker image to use for dockerized builds.

  • dockerSocket: "/var/run/docker.sock"

    Path to Docker API endpoint.

  • dockerfile: string

    Dockerfile to build the build image if not downloadable.

  • noFetch: false

    Don't run "git fetch" during build.

  • outputDir: string

    Name of output directory.

  • outputGid: undefined | string

    Owner gid that is set on build artifacts.

  • outputUid: undefined | string

    Owner uid that is set on build artifacts.

  • podman: false

    Whether to use Podman instead of Docker to run the build container.

  • preferredRemote: undefined | string

    Used for historical builds.

  • quiet: false

    Whether the build log should be printed only on error, or always

  • raw: false

    Whether to bypass Docker and use the toolchain from the environment.

  • script: string

    Script that runs inside the build container, e.g. build.impl.mjs

  • sshAuthSocket: undefined | string

    Used to authenticate Git in build container.

  • toolchain: ""

    Which version of the Rust toolchain to use, e.g. 1.61.0

  • verbose: false

    Whether the build process should print more detail to the console.

  • workspace: string

    Workspace root for project crates. This is the directory that contains the root Cargo.toml. Defaults to parent directory of FADROMA_PROJECT.

chain?: string = ...

Name of chain to use.

chainId?: string

Override chain id.

chainMode: ChainMode = ...

Override chain mode.

deploy: {
    format: "v1";
    multisig: false;
    storePath: null | string;
} = ...

Deploy options.

Type declaration

  • format: "v1"

    Which implementation of the receipt store to use.

  • multisig: false

    Whether to generate unsigned transactions for manual multisig signing.

  • storePath: null | string

    Directory to store the receipts for the deployed contracts.

devnet: Partial<Devnet> = ...

Devnet options.

environment?: Environment
license?: string = ...

License token.

log: ConnectConsole = ...

Logger handle.

mnemonic?: string = ...

Mnemonic to use for authentication. Hidden from logs by default.

project: string = ...

Project file. Defaults to node_modules/fadroma/index.ts, which just runs the Fadroma CLI and can create a project. Projects are expected to set this var to their own root file, which does export default class MyProject extends Fadroma.Project { ... } and points to the Deployment class.

root: string = ...

The topmost directory visible to Fadroma. Usually the root of NPM package and Cargo workspace.

scrt: Config

Secret Network configuration.

testnetMnemonic?: string = ...

Mnemonic to use for authentication to testnet.

upload: {
    reupload: false;
    uploadState: null | string;
    uploader: "FS";
} = ...

Upload options.

Type declaration

  • reupload: false

    Whether to always upload contracts, ignoring upload receipts that match.

  • uploadState: null | string

    Directory to store the receipts for the deployed contracts.

  • uploader: "FS"

    Variant of uploader to use

Accessors

Methods

  • Create the Chain instance specified by the configuration.

    Type Parameters

    Parameters

    • chainToGet: undefined | string | ((config) => Chain) = ...

    Returns C

  • Create a new Deployment. If a deploy store is specified, populate it with stored data (if present).

    Type Parameters

    Parameters

    Returns T

    Deployment or subclass

  • Type Parameters

    • T extends boolean

    • U

    Parameters

    • name: string
    • Optional fallback: (() => T | U)
        • (): T | U
        • Returns T | U

    Returns T | U

  • Type Parameters

    • T extends number

    • U

    Parameters

    • name: string
    • Optional fallback: (() => T | U)
        • (): T | U
        • Returns T | U

    Returns T | U

  • Type Parameters

    • T extends string

    • U

    Parameters

    • name: string
    • Optional fallback: (() => T | U)
        • (): T | U
        • Returns T | U

    Returns T | U

  • Type Parameters

    Parameters

    • Optional Uploader: U
    • Rest ...args: ConstructorParameters<U>

    Returns T

    a configured uploader.

Generated using TypeDoc