A collection of contracts.

Hierarchy

Constructors

Properties

[toStringTag]: string
log: Console = ...
name: string = ...
size: number

Returns

the number of elements in the Map.

[species]: MapConstructor

Methods

  • Returns an iterable of entries in the map.

    Returns IterableIterator<[string, DeploymentUnit]>

  • Parameters

    • Rest ...args: [name: string, properties?: {
          [toStringTag]: string;
          address?: string;
          canCompile: boolean;
          canCompileInfo: string;
          canFetch: boolean;
          canFetchInfo: string;
          canInstantiate: boolean;
          canInstantiateInfo: string;
          canUpload: boolean;
          canUploadInfo: string;
          chainId?: string;
          codeData?: Uint8Array;
          codeHash?: string;
          codeId?: string;
          codePath?: string | URL;
          compiled?: CompiledCode;
          compiler?: Compiler;
          deployer?: string | Connection;
          deployment?: Deployment;
          initBy?: string | Connection;
          initFee?: unknown;
          initGas?: unknown;
          initMemo?: string;
          initMsg?: Into<Message>;
          initSend?: ICoin[];
          initTx?: string;
          isTemplate?: false;
          label?: string;
          language?: "rust";
          log?: Console;
          name?: string;
          source?: SourceCode;
          sourceDirty?: boolean;
          sourceOrigin?: string | URL;
          sourcePath?: string;
          sourceRef?: string;
          uploadBy?: string | Connection;
          uploadGas?: string | number;
          uploadTx?: string;
          uploaded?: UploadedCode;
          uploader?: string | Connection;
          compile?(__namedParameters?) => Promise<CompiledCode & {
              codeHash: string;
          }>;
          computeHash?() => Promise<CompiledCode & {
              codeHash: string;
          }>;
          connect?(agent?) => Contract;
          deploy?(__namedParameters?) => Promise<ContractInstance & {
              address: string;
          }>;
          fetch?() => Promise<Uint8Array>;
          isValid?() => this is ContractInstance & {
              address: string;
          };
          serialize?() => {
              sourceDirty?: boolean;
              sourceOrigin?: string;
              sourcePath?: string;
              sourceRef?: string;
              [key: string]: unknown;
          };
          upload?(__namedParameters?) => Promise<UploadedCode & {
              codeId: string;
          }>;
      }]

    Returns Deployment

  • Parameters

    • Rest ...args: [name: string, properties?: {
          [toStringTag]: string;
          canCompile: boolean;
          canCompileInfo: string;
          canFetch: boolean;
          canFetchInfo: string;
          canInstantiate: boolean;
          canInstantiateInfo: string;
          canUpload: boolean;
          canUploadInfo: string;
          chainId?: string;
          codeData?: Uint8Array;
          codeHash?: string;
          codeId?: string;
          codePath?: string | URL;
          language?: "rust";
          log?: Console;
          sourceDirty?: boolean;
          sourceOrigin?: string | URL;
          sourcePath?: string;
          sourceRef?: string;
          uploadBy?: string | Connection;
          uploadGas?: string | number;
          uploadTx?: string;
          computeHash?() => Promise<CompiledCode & {
              codeHash: string;
          }>;
          fetch?() => Promise<Uint8Array>;
          serialize?() => {
              sourceDirty?: boolean;
              sourceOrigin?: string;
              sourcePath?: string;
              sourceRef?: string;
              [key: string]: unknown;
          };
      }]

    Returns Deployment

  • Parameters

    • __namedParameters: {
          compiler?: Compiler;
          rebuild?: boolean;
      } & {
          units?: string[];
      } = {}

    Returns Promise<Record<string, CompiledCode & {
        codeHash: string;
    }>>

  • Returns void

  • Define a contract that will be automatically compiled, uploaded, and instantiated as part of this deployment.

    Parameters

    • name: string
    • Optional properties: {
          [toStringTag]: string;
          address?: string;
          canCompile: boolean;
          canCompileInfo: string;
          canFetch: boolean;
          canFetchInfo: string;
          canInstantiate: boolean;
          canInstantiateInfo: string;
          canUpload: boolean;
          canUploadInfo: string;
          chainId?: string;
          codeData?: Uint8Array;
          codeHash?: string;
          codeId?: string;
          codePath?: string | URL;
          compiled?: CompiledCode;
          compiler?: Compiler;
          deployer?: string | Connection;
          deployment?: Deployment;
          initBy?: string | Connection;
          initFee?: unknown;
          initGas?: unknown;
          initMemo?: string;
          initMsg?: Into<Message>;
          initSend?: ICoin[];
          initTx?: string;
          isTemplate?: false;
          label?: string;
          language?: "rust";
          log?: Console;
          name?: string;
          source?: SourceCode;
          sourceDirty?: boolean;
          sourceOrigin?: string | URL;
          sourcePath?: string;
          sourceRef?: string;
          uploadBy?: string | Connection;
          uploadGas?: string | number;
          uploadTx?: string;
          uploaded?: UploadedCode;
          uploader?: string | Connection;
          compile?(__namedParameters?) => Promise<CompiledCode & {
              codeHash: string;
          }>;
          computeHash?() => Promise<CompiledCode & {
              codeHash: string;
          }>;
          connect?(agent?) => Contract;
          deploy?(__namedParameters?) => Promise<ContractInstance & {
              address: string;
          }>;
          fetch?() => Promise<Uint8Array>;
          isValid?() => this is ContractInstance & {
              address: string;
          };
          serialize?() => {
              sourceDirty?: boolean;
              sourceOrigin?: string;
              sourcePath?: string;
              sourceRef?: string;
              [key: string]: unknown;
          };
          upload?(__namedParameters?) => Promise<UploadedCode & {
              codeId: string;
          }>;
      }
      • [toStringTag]: string
      • Optional address?: string

        Address of this contract instance. Unique per chain.

      • canCompile: boolean
      • canCompileInfo: string
      • canFetch: boolean
      • canFetchInfo: string
      • canInstantiate: boolean
      • canInstantiateInfo: string
      • canUpload: boolean
      • canUploadInfo: string
      • Optional chainId?: string

        ID of chain on which this contract is uploaded.

      • Optional codeData?: Uint8Array

        The compiled code.

      • Optional codeHash?: string

        Code hash uniquely identifying the compiled code.

      • Optional codeId?: string

        Code ID representing the identity of the contract's code on a specific chain.

      • Optional codePath?: string | URL

        Location of the compiled code.

      • Optional compiled?: CompiledCode
      • Optional compiler?: Compiler
      • Optional deployer?: string | Connection
      • Optional deployment?: Deployment

        Deployment to which this unit belongs.

      • Optional initBy?: string | Connection

        Address of agent that performed the init tx.

      • Optional initFee?: unknown

        Fee to use for init.

      • Optional initGas?: unknown

        Contents of init message.

      • Optional initMemo?: string

        Instantiation memo.

      • Optional initMsg?: Into<Message>

        Contents of init message.

      • Optional initSend?: ICoin[]

        Native tokens to send to the new contract.

      • Optional initTx?: string

        ID of transaction that performed the init.

      • Optional Readonly isTemplate?: false
      • Optional label?: string

        Full label of the instance. Unique for a given chain.

      • Optional language?: "rust"
      • Optional log?: Console
      • Optional name?: string

        Name of this unit.

      • Optional source?: SourceCode
      • Optional sourceDirty?: boolean

        Whether the code contains uncommitted changes.

      • Optional sourceOrigin?: string | URL

        URL pointing to Git upstream containing the canonical source code.

      • Optional sourcePath?: string

        Path to local checkout of the source code (with .git directory if sourceRef is set).

      • Optional sourceRef?: string

        Pointer to the source commit.

      • Optional uploadBy?: string | Connection

        address of agent that performed the upload.

      • Optional uploadGas?: string | number

        address of agent that performed the upload.

      • Optional uploadTx?: string

        TXID of transaction that performed the upload.

      • Optional uploaded?: UploadedCode
      • Optional uploader?: string | Connection
      • compile?:function
        • Compile this contract, unless a valid binary is present and a rebuild is not requested.

          Parameters

          • __namedParameters: {
                compiler?: Compiler;
                rebuild?: boolean;
            } = {}
            • Optional compiler?: Compiler
            • Optional rebuild?: boolean

          Returns Promise<CompiledCode & {
              codeHash: string;
          }>

      • computeHash?:function
      • connect?:function
      • deploy?:function
        • Parameters

          • __namedParameters: {
                compiler?: Compiler;
                rebuild?: boolean;
            } & {
                reupload?: boolean;
                uploadFee?: ICoin[] | "auto";
                uploadMemo?: string;
                uploadStore?: UploadStore;
            } & {
                reupload?: boolean;
                uploader?: string | {
                    upload: ((code, options?) => Promise<UploadedCode & {
                        chainId: string;
                        codeId: string;
                    }>);
                };
            } & Partial<ContractInstance> & {
                deployer?: string | {
                    instantiate: ((contract, options) => Promise<ContractInstance & {
                        address: string;
                    }>);
                };
                redeploy?: boolean;
            } = {}

          Returns Promise<ContractInstance & {
              address: string;
          }>

      • fetch?:function
      • isValid?:function
      • serialize?:function
        • Returns {
              sourceDirty?: boolean;
              sourceOrigin?: string;
              sourcePath?: string;
              sourceRef?: string;
              [key: string]: unknown;
          }

          • [key: string]: unknown
          • Optional sourceDirty?: boolean
          • Optional sourceOrigin?: string
          • Optional sourcePath?: string
          • Optional sourceRef?: string
      • upload?:function
        • Upload this contract, unless a valid upload is present and a rebuild is not requested.

          Parameters

          • __namedParameters: {
                compiler?: Compiler;
                rebuild?: boolean;
            } & {
                reupload?: boolean;
                uploadFee?: ICoin[] | "auto";
                uploadMemo?: string;
                uploadStore?: UploadStore;
            } & {
                reupload?: boolean;
                uploader?: string | {
                    upload: ((code, options?) => Promise<UploadedCode & {
                        chainId: string;
                        codeId: string;
                    }>);
                };
            } = {}

          Returns Promise<UploadedCode & {
              codeId: string;
          }>

    Returns ContractInstance

  • Parameters

    • key: string

    Returns boolean

    true if an element in the Map existed and has been removed, or false if the element does not exist.

  • Parameters

    • __namedParameters: {
          compiler?: Compiler;
          rebuild?: boolean;
      } & {
          reupload?: boolean;
          uploadFee?: ICoin[] | "auto";
          uploadMemo?: string;
          uploadStore?: UploadStore;
      } & {
          reupload?: boolean;
          uploader?: string | {
              upload: ((code, options?) => Promise<UploadedCode & {
                  chainId: string;
                  codeId: string;
              }>);
          };
      } & Partial<ContractInstance> & {
          deployer?: string | {
              instantiate: ((contract, options) => Promise<ContractInstance & {
                  address: string;
              }>);
          };
          redeploy?: boolean;
      } & {
          deployStore?: DeployStore;
          units?: string[];
      } = {}

    Returns Promise<Record<string, ContractInstance & {
        address: string;
    }>>

  • Returns an iterable of key, value pairs for every entry in the map.

    Returns IterableIterator<[string, DeploymentUnit]>

  • Executes a provided function once per each key/value pair in the Map, in insertion order.

    Parameters

    • callbackfn: ((value, key, map) => void)
    • Optional thisArg: any

    Returns void

  • Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

    Parameters

    • key: string

    Returns DeploymentUnit

    Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.

  • Parameters

    • key: string

    Returns boolean

    boolean indicating whether an element with the specified key exists or not.

  • Returns an iterable of keys in the map

    Returns IterableIterator<string>

  • Returns {
        name: string;
        units: {
            [k: string]: T;
        };
    }

    • name: string
    • units: {
          [k: string]: T;
      }
      • [k: string]: T
  • Define a template, representing code that can be compiled and uploaded, but will not be automatically instantiated. This can then be used to define multiple instances of the same code.

    Parameters

    • name: string
    • Optional properties: {
          [toStringTag]: string;
          canCompile: boolean;
          canCompileInfo: string;
          canFetch: boolean;
          canFetchInfo: string;
          canInstantiate: boolean;
          canInstantiateInfo: string;
          canUpload: boolean;
          canUploadInfo: string;
          chainId?: string;
          codeData?: Uint8Array;
          codeHash?: string;
          codeId?: string;
          codePath?: string | URL;
          language?: "rust";
          log?: Console;
          sourceDirty?: boolean;
          sourceOrigin?: string | URL;
          sourcePath?: string;
          sourceRef?: string;
          uploadBy?: string | Connection;
          uploadGas?: string | number;
          uploadTx?: string;
          computeHash?() => Promise<CompiledCode & {
              codeHash: string;
          }>;
          fetch?() => Promise<Uint8Array>;
          serialize?() => {
              sourceDirty?: boolean;
              sourceOrigin?: string;
              sourcePath?: string;
              sourceRef?: string;
              [key: string]: unknown;
          };
      }
      • [toStringTag]: string
      • canCompile: boolean
      • canCompileInfo: string
      • canFetch: boolean
      • canFetchInfo: string
      • canInstantiate: boolean
      • canInstantiateInfo: string
      • canUpload: boolean
      • canUploadInfo: string
      • Optional chainId?: string

        ID of chain on which this contract is uploaded.

      • Optional codeData?: Uint8Array

        The compiled code.

      • Optional codeHash?: string

        Code hash uniquely identifying the compiled code.

      • Optional codeId?: string

        Code ID representing the identity of the contract's code on a specific chain.

      • Optional codePath?: string | URL

        Location of the compiled code.

      • Optional language?: "rust"
      • Optional log?: Console
      • Optional sourceDirty?: boolean

        Whether the code contains uncommitted changes.

      • Optional sourceOrigin?: string | URL

        URL pointing to Git upstream containing the canonical source code.

      • Optional sourcePath?: string

        Path to local checkout of the source code (with .git directory if sourceRef is set).

      • Optional sourceRef?: string

        Pointer to the source commit.

      • Optional uploadBy?: string | Connection

        address of agent that performed the upload.

      • Optional uploadGas?: string | number

        address of agent that performed the upload.

      • Optional uploadTx?: string

        TXID of transaction that performed the upload.

      • computeHash?:function
      • fetch?:function
      • serialize?:function
        • Returns {
              sourceDirty?: boolean;
              sourceOrigin?: string;
              sourcePath?: string;
              sourceRef?: string;
              [key: string]: unknown;
          }

          • [key: string]: unknown
          • Optional sourceDirty?: boolean
          • Optional sourceOrigin?: string
          • Optional sourcePath?: string
          • Optional sourceRef?: string

    Returns ContractTemplate

  • Parameters

    • __namedParameters: {
          compiler?: Compiler;
          rebuild?: boolean;
      } & {
          reupload?: boolean;
          uploadFee?: ICoin[] | "auto";
          uploadMemo?: string;
          uploadStore?: UploadStore;
      } & {
          reupload?: boolean;
          uploader?: string | {
              upload: ((code, options?) => Promise<UploadedCode & {
                  chainId: string;
                  codeId: string;
              }>);
          };
      } & {
          units?: string[];
          uploadStore?: UploadStore;
      } = {}

    Returns Promise<Record<string, UploadedCode & {
        codeId: string;
    }>>

  • Returns an iterable of values in the map

    Returns IterableIterator<DeploymentUnit>

Generated using TypeDoc