ContractFactory provides utilities for deploying and configuring contracts.

Hierarchy (view full)

Constructors

Properties

account: null | Account
bytecode: BytesLike
interface: Interface
provider: null | Provider
storageSlots: StorageSlot[]
bytecode: Uint8Array = bytecode

Methods

  • Create a transaction request to deploy a contract with the specified options.

    Parameters

    • OptionaldeployOptions: {
          chunkSizeMultiplier?: number;
          configurableConstants?: {
              [name: string]: unknown;
          };
          salt?: BytesLike;
          stateRoot?: BytesLike;
          storageSlots?: StorageSlot[];
      } & CreateTransactionRequestLike & {
          bytecode?: BytesLike;
      }

      Options for deploying the contract.

    Returns {
        contractId: string;
        transactionRequest: CreateTransactionRequest;
    }

    The CreateTransactionRequest object for deploying the contract.

  • Set configurable constants of the contract with the specified values.

    Parameters

    • configurableConstants: {
          [name: string]: unknown;
      }

      An object containing configurable names and their values.

      • [name: string]: unknown

    Returns void