Options
All
  • Public
  • Public/Protected
  • All
Menu

Pre-configured sets of contract calls that can be used as input to Caller.callBatched method.

see

CallerClient for more.

example

Example usage of collectFlow. // Create a new Caller. const caller = await CallerClient.create(provider);

// Populate the flow's payload. const flowPayload: AddressDriverPresets.CollectFlowPayload = { driverAddress, dripsHubAddress, userId, tokenAddress, maxCycles, currentReceivers, transferToAddress };

// Create a new collectFlow preset. const collectFlow = AddressDriverPresets.Presets.collectFlow(flowPayload);

// Pass the preset to the Caller. const tx = await caller.callBatched(collectFlow); await tx.wait();

Hierarchy

  • Presets

Index

Constructors

Methods

  • Creates a new batch with the following sequence of calls:

    1. squeezeDrips (optional) for each provided sender
    2. receiveDrips (optional)
    3. split (optional)
    4. collect
    see

    AddressDriverClient and DripsHubClient's API for more details.

    throws

    {@link DripsErrors.addressError} if payload.tokenAddress or the payload.transferToAddress address is not valid.

    throws

    {@link DripsErrors.argumentMissingError} if any of the required parameters is missing.

    throws

    {@link DripsErrors.argumentError} if payload.maxCycles or payload.currentReceivers is not valid.

    throws

    {@link DripsErrors.splitsReceiverError} if any of the payload.currentReceivers is not valid.

    Parameters

    Returns Promise<Preset>

    The preset.

  • Creates a new batch with the following sequence of calls:

    1. setDrips
    2. emitUserMetadata
    see

    AddressDriverClient's API for more details.

    throws

    {@link DripsErrors.addressError} if payload.tokenAddress or payload.transferToAddress is not valid.

    throws

    {@link DripsErrors.argumentMissingError} if any of the required parameters is missing.

    throws

    {@link DripsErrors.argumentError} if payload.currentReceivers' or payload.newReceivers' count exceeds the max allowed drips receivers.

    throws

    {@link DripsErrors.dripsReceiverError} if any of the payload.currentReceivers or the payload.newReceivers is not valid.

    throws

    {@link DripsErrors.dripsReceiverConfigError} if any of the receivers' configuration is not valid.

    Parameters

    Returns Promise<Preset>

    The preset.

Generated using TypeDoc