General Distribution Agreement V1 Helper Class

Description

A helper class to interact with the GDAV1 contract.

Hierarchy

  • default
    • GeneralDistributionAgreementV1

Constructors

Properties

_getCallAgreementOperation: ((callAgreementOperation, forwarderPopulatedTransactionPromise?, shouldUseCallAgreement?) => Operation)

Returns the desired Operation based on shouldUseCallAgreement.

Type declaration

    • (callAgreementOperation, forwarderPopulatedTransactionPromise?, shouldUseCallAgreement?): Operation
    • Returns the desired Operation based on shouldUseCallAgreement.

      Parameters

      • callAgreementOperation: Operation

        the host.callAgreement created Operation

      • Optional forwarderPopulatedTransactionPromise: Promise<PopulatedTransaction>

        the populated forwarder transaction promise

      • Optional shouldUseCallAgreement: boolean

        whether or not to use host.callAgreement

      Returns Operation

Param: shouldUseCallAgreement

whether or not to use host.callAgreement

Param: callAgreementOperation

the host.callAgreement created Operation

Param: forwarderPopulatedTransactionPromise

the populated forwarder transaction promise

connectPool: ((params) => Operation)

Connects a pool to the contract.

Type declaration

Param: pool

The pool address.

Param: userData

The user data.

Param: overrides

The transaction overrides.

Returns

The call agreement operation result.

createPool: ((params) => Promise<{
    createPoolTxn: ContractTransaction;
    pool: SuperfluidPoolClass;
}>)

Creates a new pool with the given token and admin.

Type declaration

    • (params): Promise<{
          createPoolTxn: ContractTransaction;
          pool: SuperfluidPoolClass;
      }>
    • Creates a new pool with the given token and admin.

      Parameters

      Returns Promise<{
          createPoolTxn: ContractTransaction;
          pool: SuperfluidPoolClass;
      }>

      CreatePoolTxn and SuperfluidPool instance

Param: token

The token address.

Param: admin

The admin address.

Returns

CreatePoolTxn and SuperfluidPool instance

disconnectPool: ((params) => Operation)

Disconnects a pool from the contract.

Type declaration

Param: pool

The pool address.

Param: userData

The user data.

Param: overrides

The transaction overrides.

Returns

The call agreement operation result.

distribute: ((params) => Operation)

Distributes funds from the sender's account to the specified pool.

Type declaration

    • (params): Operation
    • Distributes funds from the sender's account to the specified pool.

      Parameters

      Returns Operation

      The call agreement operation result.

Param: token

The token address.

Param: from

The sender's address.

Param: pool

The pool address.

Param: requestedAmount

The requested amount to distribute.

Param: userData

The user data.

Param: overrides

The transaction overrides.

Returns

The call agreement operation result.

distributeFlow: ((params) => Operation)

Distributes the flow from the sender's account to the specified pool.

Type declaration

Param: token

The token address.

Param: from

The sender's address.

Param: pool

The pool address.

Param: requestedFlowRate

The requested flow rate.

Param: userData

The user data.

Param: overrides

The transaction overrides.

Returns

The call agreement operation result.

estimateDistributionActualAmount: ((params) => Promise<string>)

Estimates the distribution's actual amount for a specific token, sender, and pool.

Type declaration

    • (params): Promise<string>
    • Estimates the distribution's actual amount for a specific token, sender, and pool.

      Returns Promise<string>

      The actual amount that will be distributed.

Param: token

The token address.

Param: from

The sender address.

Param: pool

The pool address.

Param: requestedAmount

The requested amount.

Param: providerOrSigner

A provider or signer object

Returns

The actual amount that will be distributed.

estimateFlowDistributionActualFlowRate: ((params) => Promise<FlowDistributionActualFlowRateData>)

Estimates the flow distribution's actual flow rate for a specific token, sender, and pool.

Type declaration

Param: token

The token address.

Param: from

The sender address.

Param: pool

The pool address.

Param: requestedFlowRate

The requested flow rate.

Param: providerOrSigner

A provider or signer object

Returns

The flow distribution's actual flow rate and the total distribution flow rate for the pool.

forwarder: GDAv1Forwarder
getFlowRate: ((params) => Promise<string>)

Retrieves the flow rate for a specific token, sender, and pool.

Type declaration

    • (params): Promise<string>
    • Retrieves the flow rate for a specific token, sender, and pool.

      Parameters

      Returns Promise<string>

      The flow rate from the sender to the pool for the token.

Param: token

The token address.

Param: from

The sender address.

Param: pool

The pool address.

Param: providerOrSigner

A provider or signer object

Returns

The flow rate from the sender to the pool for the token.

getNetFlow: ((params) => Promise<string>)

Retrieves the net flow for a specific token and account.

Type declaration

    • (params): Promise<string>
    • Retrieves the net flow for a specific token and account.

      Parameters

      Returns Promise<string>

      The net flow of the account for the token.

Param: token

The token address.

Param: account

The account address.

Param: providerOrSigner

A provider or signer object

Returns

The net flow of the account for the token.

getPoolAdjustmentFlowInfo: ((params) => Promise<PoolAdjustmentFlowInfo>)

Retrieves the pool adjustment flow information for a specific pool.

Type declaration

Param: pool

The address of the pool.

Param: providerOrSigner

A provider or signer object

Returns

The recipient of the pool adjustment flow, the flow hash and the rate of the adjustment flow.

getPoolAdjustmentFlowRate: ((params) => Promise<string>)

Retrieves the pool adjustment flow rate for a specific token and pool.

Type declaration

    • (params): Promise<string>
    • Retrieves the pool adjustment flow rate for a specific token and pool.

      Returns Promise<string>

      The pool adjustment flow rate for the token and pool.

Param: token

The token address.

Param: pool

The pool address.

Param: providerOrSigner

A provider or signer object

Returns

The pool adjustment flow rate for the token and pool.

host: Host
isMemberConnected: ((params) => Promise<boolean>)

Checks if a member is connected to a specific pool.

Type declaration

    • (params): Promise<boolean>
    • Checks if a member is connected to a specific pool.

      Parameters

      Returns Promise<boolean>

      Whether the member is connected to the pool.

Param: pool

The pool address.

Param: member

The member address.

Param: providerOrSigner

A provider or signer object

Returns

Whether the member is connected to the pool.

isPool: ((params) => Promise<boolean>)

Checks if a given token and account form a pool.

Type declaration

    • (params): Promise<boolean>
    • Checks if a given token and account form a pool.

      Parameters

      Returns Promise<boolean>

      Whether the account is a pool for the token.

Param: token

The token address.

Param: account

The account address.

Param: providerOrSigner

A provider or signer object

Returns

Whether the account is a pool for the token.

Generated using TypeDoc