interface Commands {
    deployContract<ABI, const CN>(contractName, abi, ...initializationArgs): DeployContractResult<A, ABI, CN>;
    invokeContract<CN, MethodName>(withWalllet, contractName, method, ...params): Chainable<A["contracts"][CN]["contract"] extends GenericContract<ABI, "allEvents" | ExtractEvents<ABI[number]>>
        ? (ABI[number] & {
                name: MethodName;
            })["stateMutability"] extends "view"
            ? MapTypeToJS<(ABI[number] & {
                name: MethodName;
            })["outputs"][0]["type"], []>
            : A
        : never, any>;
    startBlockchain(projectRootFolder?): Chainable<(A extends {}
        ? A extends undefined
            ? {}
            : A
        : {}) & {
        wallets: BlockchainWallets;
    }, any>;
}

Type Parameters

  • A extends any = any

Methods

  • Deploys a contact and returns the address that it has been deployed to

    Type Parameters

    • ABI extends readonly any[]

    • const CN extends string | readonly [string, string]

    Parameters

    • contractName: CN

      The name of the contract

    • abi: ABI
    • Rest ...initializationArgs: any[]

      The arguments for initializing the contract ("calls the initialize method")

    Returns DeployContractResult<A, ABI, CN>

  • Type Parameters

    • CN extends string | number | symbol

    • MethodName extends string | number | symbol

    Parameters

    • withWalllet: string | ((contracts, wallets) => string)
    • contractName: CN
    • method: MethodName
    • Rest ...params: TupleToFunctionTuple<A, Parameters<A["contracts"][CN]["contract"]["methods"][MethodName]>, Parameters<A["contracts"][CN]["contract"]["methods"][MethodName]>[0], [Parameters<A["contracts"][CN]["contract"]["methods"][MethodName]>[0]] extends [undefined]
          ? true
          : false>

    Returns Chainable<A["contracts"][CN]["contract"] extends GenericContract<ABI, "allEvents" | ExtractEvents<ABI[number]>>
        ? (ABI[number] & {
                name: MethodName;
            })["stateMutability"] extends "view"
            ? MapTypeToJS<(ABI[number] & {
                name: MethodName;
            })["outputs"][0]["type"], []>
            : A
        : never, any>

  • This will start up a server to deploy the contracts into

    Parameters

    • Optional projectRootFolder: string

      The root folder for the project with the contracts

    Returns Chainable<(A extends {}
        ? A extends undefined
            ? {}
            : A
        : {}) & {
        wallets: BlockchainWallets;
    }, any>

Generated using TypeDoc