A set of interrelated contracts, deployed under the same prefix.

  • Extend this class in client library to define how the contracts are found.
  • Extend this class in deployer script to define how the contracts are deployed.

Hierarchy

  • Deployment

Constructors

Properties

agent?: Agent

Agent to use when deploying contracts.

builder?: Builder

Build implementation. Contracts can't be built from source if this is missing.

chain?: Chain

Chain on which operations are executed.

contracts: Record<string, AnyContract>

Mapping of contract names to contract instances.

log: Console = ...
name: string

Name of deployment. Used as label prefix of deployed contracts.

repository?: string = undefined

Default Git ref from which contracts will be built if needed.

revision?: string = HEAD

Default Git ref from which contracts will be built if needed.

store?: DeployStore

Default state store to which updates to this deployment's state will be saved.

uploader?: Uploader

Upload implementation. Contracts can't be uploaded if this is missing -- except by using agent.upload directly, which does not cache or log uploads.

workspace?: string = undefined

Default Cargo workspace from which contracts will be built if needed.

Accessors

  • get snapshot(): {
        contracts: {};
    }
  • Returns

    a snapshot of the contracts state of this deployment

    Returns {
        contracts: {};
    }

    • contracts: {}

    Methods

    • Specify a contract.

      Returns

      a callable instance of Contract bearing the specified parameters. Calling it will deploy the contract, or retrieve it if already deployed.

      Type Parameters

      Parameters

      Returns Contract<C>

    • Check if the deployment contains a contract with a certain name.

      Returns

      boolean

      Parameters

      • name: string

      Returns boolean

    • Specify a contract template.

      Returns

      a callable instance of Template bearing the specified parameters. Calling it will build and upload the template.

      Type Parameters

      Parameters

      Returns Template<C>

    Generated using TypeDoc