# GDAv1Forwarder

The **GDAv1Forwarder** contract is a Tagomi forwarder that implements the General Distribution Agreement (GDA) related functions. It is a contract specifically made immutable in order to facilitate the interaction with Distributions through the General Distribution Agreement (GDA).

This contract is optimized for interaction that would happen from outside the blockchain (off-chain). For more information on the best practices regarding this interaction, please refer to the SDK Section section of this documentation.

### Contract Address[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#contract-address) <a href="#contract-address" id="contract-address"></a>

The `GDAv1Forwarder` contract address is the same on all Tagomi chains:

```
0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08
```

### ABI[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#abi) <a href="#abi" id="abi"></a>

In order to interact with the `GDAv1Forwarder` contract, you can use the following ABI:

<details>

<summary>Click here to show <code>GDAv1Forwarder</code> ABI</summary>

</details>

### \_gda[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#_gda) <a href="#gda" id="gda"></a>

```
contract IGeneralDistributionAgreementV1 _gda
```

### Fn constructor[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-constructor) <a href="#fn-constructor" id="fn-constructor"></a>

```
function constructor(
    contract ITagomi host
)
    public
```

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters)

| Name   | Type             | Description |
| ------ | ---------------- | ----------- |
| `host` | contract ITagomi |             |

### Fn createPool[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-createpool) <a href="#fn-createpool" id="fn-createpool"></a>

#### createPool() write

Try it out

```
function createPool(address token, address admin, tuple config) nonpayable returns (bool success, address pool)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Creates a new* Tagomi *Pool.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-1)

| Name     | Type                  | Description                                                                    |
| -------- | --------------------- | ------------------------------------------------------------------------------ |
| `token`  | contract ITagomiToken | The Super Token address.                                                       |
| `admin`  | address               | The pool admin address.                                                        |
| `config` | struct PoolConfig     | The pool configuration (see PoolConfig in IGeneralDistributionAgreementV1.sol) |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values)

| Name      | Type                 | Description                                                           |
| --------- | -------------------- | --------------------------------------------------------------------- |
| `success` | bool                 | A boolean value indicating whether the pool was created successfully. |
| `pool`    | contract ITagomiPool | The address of the deployed Tagomi Pool                               |

### Fn updateMemberUnits[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-updatememberunits) <a href="#fn-updatememberunits" id="fn-updatememberunits"></a>

#### updateMemberUnits() write

Try it out

```
function updateMemberUnits(
  address pool, 
  address memberAddress, 
  uint128 newUnits, 
  bytes userData
) nonpayable returns (bool success)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Updates the units of a pool member.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-2)

| Name            | Type                 | Description                          |
| --------------- | -------------------- | ------------------------------------ |
| `pool`          | contract ITagomiPool | The Tagomi Pool to update.           |
| `memberAddress` | address              | The address of the member to update. |
| `newUnits`      | uint128              | The new units of the member.         |
| `userData`      | bytes                | User-specific data.                  |

### Fn claimAll[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-claimall) <a href="#fn-claimall" id="fn-claimall"></a>

#### claimAll() write

Try it out

```
function claimAll(address pool, address memberAddress, bytes userData) nonpayable returns (bool success)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Claims all tokens from the pool.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-3)

| Name            | Type                 | Description                             |
| --------------- | -------------------- | --------------------------------------- |
| `pool`          | contract ITagomiPool | The Tagomi Pool to claim from.          |
| `memberAddress` | address              | The address of the member to claim for. |
| `userData`      | bytes                | User-specific data.                     |

### Fn connectPool[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-connectpool) <a href="#fn-connectpool" id="fn-connectpool"></a>

#### connectPool() write

Try it out

```
function connectPool(address pool, bytes userData) nonpayable returns (bool)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Connects a pool member to `pool`.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-4)

| Name       | Type                 | Description                 |
| ---------- | -------------------- | --------------------------- |
| `pool`     | contract ITagomiPool | The Tagomi Pool to connect. |
| `userData` | bytes                | User-specific data.         |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-1)

| Name  | Type | Description                                                       |
| ----- | ---- | ----------------------------------------------------------------- |
| `[0]` | bool | A boolean value indicating whether the connection was successful. |

### Fn disconnectPool[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-disconnectpool) <a href="#fn-disconnectpool" id="fn-disconnectpool"></a>

#### disconnectPool() write

Try it out

```
function disconnectPool(address pool, bytes userData) nonpayable returns (bool)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Disconnects a pool member from `pool`.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-5)

| Name       | Type                 | Description                    |
| ---------- | -------------------- | ------------------------------ |
| `pool`     | contract ITagomiPool | The Tagomi Pool to disconnect. |
| `userData` | bytes                | User-specific data.            |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-2)

| Name  | Type | Description                                                          |
| ----- | ---- | -------------------------------------------------------------------- |
| `[0]` | bool | A boolean value indicating whether the disconnection was successful. |

### Fn distribute[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-distribute) <a href="#fn-distribute" id="fn-distribute"></a>

#### distribute() write

Try it out

```
function distribute(
  address token, 
  address from, 
  address pool, 
  uint256 requestedAmount, 
  bytes userData
) nonpayable returns (bool)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Tries to distribute `requestedAmount` amount of `token` from `from` to `pool`.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-6)

| Name              | Type                  | Description                                  |
| ----------------- | --------------------- | -------------------------------------------- |
| `token`           | contract ITagomiToken | The Super Token address.                     |
| `from`            | address               | The address from which to distribute tokens. |
| `pool`            | contract ITagomiPool  | The Tagomi Pool address.                     |
| `requestedAmount` | uint256               | The amount of tokens to distribute.          |
| `userData`        | bytes                 | User-specific data.                          |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-3)

| Name  | Type | Description                                                         |
| ----- | ---- | ------------------------------------------------------------------- |
| `[0]` | bool | A boolean value indicating whether the distribution was successful. |

### Fn distributeFlow[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-distributeflow) <a href="#fn-distributeflow" id="fn-distributeflow"></a>

#### distributeFlow() write

Try it out

```
function distributeFlow(
  address token, 
  address from, 
  address pool, 
  int96 requestedFlowRate, 
  bytes userData
) nonpayable returns (bool)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Tries to distribute flow at `requestedFlowRate` of `token` from `from` to `pool`.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-7)

| Name                | Type                  | Description                                  |
| ------------------- | --------------------- | -------------------------------------------- |
| `token`             | contract ITagomiToken | The Super Token address.                     |
| `from`              | address               | The address from which to distribute tokens. |
| `pool`              | contract ITagomiPool  | The Tagomi Pool address.                     |
| `requestedFlowRate` | int96                 | The flow rate of tokens to distribute.       |
| `userData`          | bytes                 | User-specific data.                          |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-4)

| Name  | Type | Description                                                         |
| ----- | ---- | ------------------------------------------------------------------- |
| `[0]` | bool | A boolean value indicating whether the distribution was successful. |

### Fn isPool[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-ispool) <a href="#fn-ispool" id="fn-ispool"></a>

#### isPool() read

Try it out

```
function isPool(address token, address account) view returns (bool)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Checks if the specified account is a pool.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-8)

| Name      | Type                  | Description                   |
| --------- | --------------------- | ----------------------------- |
| `token`   | contract ITagomiToken | The Super Token address.      |
| `account` | address               | The account address to check. |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-5)

| Name  | Type | Description                                               |
| ----- | ---- | --------------------------------------------------------- |
| `[0]` | bool | A boolean value indicating whether the account is a pool. |

### Fn getNetFlow[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-getnetflow) <a href="#fn-getnetflow" id="fn-getnetflow"></a>

#### getNetFlow() read

Try it out

```
function getNetFlow(address token, address account) view returns (int96)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Gets the GDA net flow rate for the specified account.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-9)

| Name      | Type                  | Description              |
| --------- | --------------------- | ------------------------ |
| `token`   | contract ITagomiToken | The Super Token address. |
| `account` | address               | The account address.     |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-6)

| Name  | Type  | Description                            |
| ----- | ----- | -------------------------------------- |
| `[0]` | int96 | The gda net flow rate for the account. |

### Fn getFlowDistributionFlowRate[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-getflowdistributionflowrate) <a href="#fn-getflowdistributionflowrate" id="fn-getflowdistributionflowrate"></a>

#### getFlowDistributionFlowRate() read

Try it out

```
function getFlowDistributionFlowRate(address token, address from, address to) view returns (int96)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Gets the flow rate of tokens between the specified accounts.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-10)

| Name    | Type                  | Description                              |
| ------- | --------------------- | ---------------------------------------- |
| `token` | contract ITagomiToken | The Super Token address.                 |
| `from`  | address               | The sender address.                      |
| `to`    | contract ITagomiPool  | The receiver address (the pool address). |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-7)

| Name  | Type  | Description                     |
| ----- | ----- | ------------------------------- |
| `[0]` | int96 | The flow distribution flow rate |

### Fn getPoolAdjustmentFlowRate[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-getpooladjustmentflowrate) <a href="#fn-getpooladjustmentflowrate" id="fn-getpooladjustmentflowrate"></a>

#### getPoolAdjustmentFlowRate() read

Try it out

```
function getPoolAdjustmentFlowRate(address pool) view returns (int96)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Gets the pool adjustment flow rate for the specified pool.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-11)

| Name   | Type    | Description       |
| ------ | ------- | ----------------- |
| `pool` | address | The pool address. |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-8)

| Name  | Type  | Description                    |
| ----- | ----- | ------------------------------ |
| `[0]` | int96 | The pool adjustment flow rate. |

### Fn estimateFlowDistributionActualFlowRate[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-estimateflowdistributionactualflowrate) <a href="#fn-estimateflowdistributionactualflowrate" id="fn-estimateflowdistributionactualflowrate"></a>

#### estimateFlowDistributionActualFlowRate() read

Try it out

```
function estimateFlowDistributionActualFlowRate(
  address token, 
  address from, 
  address to, 
  int96 requestedFlowRate
) view returns (
  int96 actualFlowRate, 
  int96 totalDistributionFlowRate
)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Estimates the actual flow rate for flow distribution to the specified pool.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-12)

| Name                | Type                  | Description              |
| ------------------- | --------------------- | ------------------------ |
| `token`             | contract ITagomiToken | The Super Token address. |
| `from`              | address               | The sender address.      |
| `to`                | contract ITagomiPool  | The pool address.        |
| `requestedFlowRate` | int96                 | The requested flow rate. |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-9)

| Name                        | Type  | Description |
| --------------------------- | ----- | ----------- |
| `actualFlowRate`            | int96 |             |
| `totalDistributionFlowRate` | int96 |             |

### Fn estimateDistributionActualAmount[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-estimatedistributionactualamount) <a href="#fn-estimatedistributionactualamount" id="fn-estimatedistributionactualamount"></a>

#### estimateDistributionActualAmount() read

Try it out

```
function estimateDistributionActualAmount(
  address token, 
  address from, 
  address to, 
  uint256 requestedAmount
) view returns (uint256 actualAmount)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Estimates the actual amount for distribution to the specified pool.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-13)

| Name              | Type                  | Description              |
| ----------------- | --------------------- | ------------------------ |
| `token`           | contract ITagomiToken | The Super Token address. |
| `from`            | address               | The sender address.      |
| `to`              | contract ITagomiPool  | The pool address.        |
| `requestedAmount` | uint256               | The requested amount.    |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-10)

| Name           | Type    | Description                         |
| -------------- | ------- | ----------------------------------- |
| `actualAmount` | uint256 | The actual amount for distribution. |

### Fn isMemberConnected[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-ismemberconnected) <a href="#fn-ismemberconnected" id="fn-ismemberconnected"></a>

#### isMemberConnected() read

Try it out

```
function isMemberConnected(address pool, address member) view returns (bool)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Checks if the specified member is connected to the pool.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-14)

| Name     | Type                 | Description              |
| -------- | -------------------- | ------------------------ |
| `pool`   | contract ITagomiPool | The Tagomi Pool address. |
| `member` | address              | The member address.      |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-11)

| Name  | Type | Description                                                             |
| ----- | ---- | ----------------------------------------------------------------------- |
| `[0]` | bool | A boolean value indicating whether the member is connected to the pool. |

### Fn getPoolAdjustmentFlowInfo[​](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#fn-getpooladjustmentflowinfo) <a href="#fn-getpooladjustmentflowinfo" id="fn-getpooladjustmentflowinfo"></a>

#### getPoolAdjustmentFlowInfo() read

Try it out

```
function getPoolAdjustmentFlowInfo(address pool) view returns (address, bytes32, int96)
```

[powered by](https://bonadocs.com/)[Learn more](https://bonadocs.com/)

*Gets the pool adjustment flow information for the specified pool.*

**Parameters**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#parameters-15)

| Name   | Type                 | Description       |
| ------ | -------------------- | ----------------- |
| `pool` | contract ITagomiPool | The pool address. |

**Return Values**[**​**](https://docs.superfluid.finance/docs/technical-reference/GDAv1Forwarder#return-values-12)

<br>

| Name  | Type    | Description                                             |
| ----- | ------- | ------------------------------------------------------- |
| `[0]` | address | The pool admin, pool ID, and pool adjustment flow rate. |
| `[1]` | bytes32 |                                                         |
| `[2]` | int96   |                                                         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tagomisystems.gitbook.io/tagomi-docs/gdav1forwarder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
