> For the complete documentation index, see [llms.txt](https://docs.inverter.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inverter.network/contracts/technical-reference/modules/logic-module/interfaces/ilm_pc_bounties_v1.sol.md).

# ILM\_PC\_Bounties\_v1.sol

ILM\_PC\_Bounties\_v1

[Git Source](https://github.com/InverterNetwork/inverter-contracts/blob/649b450f02fc8b735c128ff0821467e71966c666/src/modules/logicModule/interfaces/ILM_PC_Bounties_v1.sol)

**Inherits:** IERC20PaymentClientBase\_v1

### Functions

#### getBountyInformation

Returns the Bounty instance with id `id`.

```solidity
function getBountyInformation(uint bountyId)
    external
    view
    returns (Bounty memory);
```

**Parameters**

| Name       | Type      | Description                     |
| ---------- | --------- | ------------------------------- |
| `bountyId` | `uint256` | The id of the Bounty to return. |

**Returns**

| Name     | Type     | Description          |
| -------- | -------- | -------------------- |
| `<none>` | `Bounty` | Bounty with id `id`. |

#### listBountyIds

Returns total list of Bounty ids.

*List is in ascending order.*

```solidity
function listBountyIds() external view returns (uint[] memory);
```

**Returns**

| Name     | Type        | Description         |
| -------- | ----------- | ------------------- |
| `<none>` | `uint256[]` | List of Bounty ids. |

#### isExistingBountyId

Returns whether Bounty with id `id` exists.

```solidity
function isExistingBountyId(uint bountyId) external view returns (bool);
```

**Parameters**

| Name       | Type      | Description                   |
| ---------- | --------- | ----------------------------- |
| `bountyId` | `uint256` | The id of the Bounty to test. |

**Returns**

| Name     | Type   | Description                                         |
| -------- | ------ | --------------------------------------------------- |
| `<none>` | `bool` | True if Claim with id `id` exists, false otherwise. |

#### getClaimInformation

Returns the Claim instance with id `id`.

```solidity
function getClaimInformation(uint claimId)
    external
    view
    returns (Claim memory);
```

**Parameters**

| Name      | Type      | Description                    |
| --------- | --------- | ------------------------------ |
| `claimId` | `uint256` | The id of the Claim to return. |

**Returns**

| Name     | Type    | Description         |
| -------- | ------- | ------------------- |
| `<none>` | `Claim` | Claim with id `id`. |

#### listClaimIds

Returns total list of Claim ids.

*List is in ascending order.*

```solidity
function listClaimIds() external view returns (uint[] memory);
```

**Returns**

| Name     | Type        | Description        |
| -------- | ----------- | ------------------ |
| `<none>` | `uint256[]` | List of Claim ids. |

#### isExistingClaimId

Returns whether Claim with id `id` exists.

```solidity
function isExistingClaimId(uint claimId) external view returns (bool);
```

**Parameters**

| Name      | Type      | Description                   |
| --------- | --------- | ----------------------------- |
| `claimId` | `uint256` | The id of the Bounty to test. |

**Returns**

| Name     | Type   | Description                                         |
| -------- | ------ | --------------------------------------------------- |
| `<none>` | `bool` | True if Claim with id `id` exists, false otherwise. |

#### listClaimIdsForContributorAddress

Returns a list of Claim ids in which contributor Address is used.

*List is in ascending order.*

*Returns an empty .*

```solidity
function listClaimIdsForContributorAddress(address contributorAddrs)
    external
    view
    returns (uint[] memory);
```

**Parameters**

| Name               | Type      | Description                                        |
| ------------------ | --------- | -------------------------------------------------- |
| `contributorAddrs` | `address` | claim ids are filtered by the contributor address. |

**Returns**

| Name     | Type        | Description        |
| -------- | ----------- | ------------------ |
| `<none>` | `uint256[]` | List of Claim ids. |

#### addBounty

Adds a new Bounty.

*Reverts if an argument invalid.*

```solidity
function addBounty(
    uint minimumPayoutAmount,
    uint maximumPayoutAmount,
    bytes calldata details
) external returns (uint);
```

**Parameters**

| Name                  | Type      | Description                                                              |
| --------------------- | --------- | ------------------------------------------------------------------------ |
| `minimumPayoutAmount` | `uint256` | The minimum amount of tokens the Bounty will pay out upon being claimed. |
| `maximumPayoutAmount` | `uint256` | The maximum amount of tokens the Bounty will pay out upon being claimed. |
| `details`             | `bytes`   | The Bounty's details.                                                    |

**Returns**

| Name     | Type      | Description                |
| -------- | --------- | -------------------------- |
| `<none>` | `uint256` | The newly added Bounty id. |

#### addBountyBatch

Adds a new array of Bounties.

*Reverts if an argument invalid.*

```solidity
function addBountyBatch(
    uint[] calldata minimumPayoutAmounts,
    uint[] calldata maximumPayoutAmounts,
    bytes[] calldata detailArray
) external returns (uint[] memory ids);
```

**Parameters**

| Name                   | Type        | Description                                                                      |
| ---------------------- | ----------- | -------------------------------------------------------------------------------- |
| `minimumPayoutAmounts` | `uint256[]` | The array of minimum amount of tokens the Bounty will pay out upon being claimed |
| `maximumPayoutAmounts` | `uint256[]` | The array of maximum amount of tokens the Bounty will pay out upon being claimed |
| `detailArray`          | `bytes[]`   | The array of Bounty's details.                                                   |

**Returns**

| Name  | Type        | Description                          |
| ----- | ----------- | ------------------------------------ |
| `ids` | `uint256[]` | The newly added array of Bounty ids. |

#### updateBounty

Updates a Bounty's informations.

*Reverts if an argument invalid.*

```solidity
function updateBounty(uint bountyId, bytes calldata details) external;
```

**Parameters**

| Name       | Type      | Description                                |
| ---------- | --------- | ------------------------------------------ |
| `bountyId` | `uint256` | The id of the Bounty that will be updated. |
| `details`  | `bytes`   | The Bounty's details.                      |

#### lockBounty

Locks the Bounty so it cant be claimed.

*Only callable by authorized addresses.*

*Reverts if id invalid.*

```solidity
function lockBounty(uint bountyId) external;
```

**Parameters**

| Name       | Type      | Description                               |
| ---------- | --------- | ----------------------------------------- |
| `bountyId` | `uint256` | The id of the Bounty that will be locked. |

#### addClaim

Adds a new Claim.

*Reverts if an argument invalid.*

```solidity
function addClaim(
    uint bountyId,
    Contributor[] calldata contributors,
    bytes calldata details
) external returns (uint);
```

**Parameters**

| Name           | Type            | Description                                 |
| -------------- | --------------- | ------------------------------------------- |
| `bountyId`     | `uint256`       | The id of the bounty this claim belongs to. |
| `contributors` | `Contributor[]` | The contributor information for the Claim.  |
| `details`      | `bytes`         | The Claim's details.                        |

**Returns**

| Name     | Type      | Description                 |
| -------- | --------- | --------------------------- |
| `<none>` | `uint256` | The newly added Claim's id. |

#### updateClaimContributors

Updates a Claim's contributor informations.

*Reverts if an argument invalid.*

```solidity
function updateClaimContributors(
    uint claimId,
    Contributor[] calldata contributors
) external;
```

**Parameters**

| Name           | Type            | Description                                |
| -------------- | --------------- | ------------------------------------------ |
| `claimId`      | `uint256`       | The id of the Claim that will be updated.  |
| `contributors` | `Contributor[]` | The contributor information for the Claim. |

#### updateClaimDetails

Updates a Claim Details.

```solidity
function updateClaimDetails(uint claimId, bytes calldata details) external;
```

**Parameters**

| Name      | Type      | Description                               |
| --------- | --------- | ----------------------------------------- |
| `claimId` | `uint256` | The id of the Claim that will be updated. |
| `details` | `bytes`   | The Claim's details.                      |

#### verifyClaim

Completes a Bounty by verifying a claim.

*Only callable by authorized addresses.*

*Reverts if id invalid.*

*contributors should be copied out of the given Claim. The parameter is used to prevent front running.*

```solidity
function verifyClaim(uint claimId, Contributor[] calldata contributors)
    external;
```

**Parameters**

| Name           | Type            | Description                                         |
| -------------- | --------------- | --------------------------------------------------- |
| `claimId`      | `uint256`       | The id of the Claim that wants to claim the Bounty. |
| `contributors` | `Contributor[]` | The contributor information for the Claim.          |

### Events

#### BountyAdded

Event emitted when a new Bounty is added.

```solidity
event BountyAdded(
    uint indexed bountyId,
    uint minimumPayoutAmount,
    uint maximumPayoutAmount,
    bytes details
);
```

**Parameters**

| Name                  | Type      | Description                                                              |
| --------------------- | --------- | ------------------------------------------------------------------------ |
| `bountyId`            | `uint256` | The id of the newly added Bounty.                                        |
| `minimumPayoutAmount` | `uint256` | The minimum amount of tokens the Bounty will pay out upon being claimed. |
| `maximumPayoutAmount` | `uint256` | The maximum amount of tokens the Bounty will pay out upon being claimed. |
| `details`             | `bytes`   | The Bounty's details.                                                    |

#### BountyUpdated

Event emitted when a Bounty got updated.

```solidity
event BountyUpdated(uint indexed bountyId, bytes details);
```

**Parameters**

| Name       | Type      | Description                   |
| ---------- | --------- | ----------------------------- |
| `bountyId` | `uint256` | The id of the updated Bounty. |
| `details`  | `bytes`   | The Bounty's details.         |

#### BountyLocked

Event emitted when a Bounty gets locked.

```solidity
event BountyLocked(uint indexed bountyId);
```

**Parameters**

| Name       | Type      | Description                  |
| ---------- | --------- | ---------------------------- |
| `bountyId` | `uint256` | The id of the locked Bounty. |

#### ClaimAdded

Event emitted when a new Claim is added.

```solidity
event ClaimAdded(
    uint indexed claimId,
    uint indexed bountyId,
    Contributor[] contributors,
    bytes details
);
```

**Parameters**

| Name           | Type            | Description                                |
| -------------- | --------------- | ------------------------------------------ |
| `claimId`      | `uint256`       | The id of the newly added Claim.           |
| `bountyId`     | `uint256`       | The id of the Bounty that got claimed.     |
| `contributors` | `Contributor[]` | The contributor information for the Claim. |
| `details`      | `bytes`         | The Claim's details.                       |

#### ClaimContributorsUpdated

Event emitted when Claim Contributors got updated.

```solidity
event ClaimContributorsUpdated(
    uint indexed claimId, Contributor[] contributors
);
```

**Parameters**

| Name           | Type            | Description                                |
| -------------- | --------------- | ------------------------------------------ |
| `claimId`      | `uint256`       | The id of the Claim that got updated.      |
| `contributors` | `Contributor[]` | The contributor information for the Claim. |

#### ClaimDetailsUpdated

Event emitted when Claim Details got updated.

```solidity
event ClaimDetailsUpdated(uint indexed claimId, bytes details);
```

**Parameters**

| Name      | Type      | Description                           |
| --------- | --------- | ------------------------------------- |
| `claimId` | `uint256` | The id of the Claim that got updated. |
| `details` | `bytes`   | The Claim's details.                  |

#### ClaimVerified

Event emitted when a Claim is verified.

```solidity
event ClaimVerified(uint indexed claimId);
```

**Parameters**

| Name      | Type      | Description                            |
| --------- | --------- | -------------------------------------- |
| `claimId` | `uint256` | The id of the Claim that got verified. |

### Errors

#### Module\_\_LM\_PC\_Bounty\_\_OnlyClaimContributor

Access only to addresses that are listed as contributors in the according claim.

```solidity
error Module__LM_PC_Bounty__OnlyClaimContributor();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidPayoutAmounts

Given payoutAmounts are either zero or maximumPayoutAmount is smaller than minimumPayoutAmount.

```solidity
error Module__LM_PC_Bounty__InvalidPayoutAmounts();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidArrayLengths

Given array lengths are invalid.

```solidity
error Module__LM_PC_Bounty__InvalidArrayLengths();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidBountyId

Given Bounty id is not existing.

```solidity
error Module__LM_PC_Bounty__InvalidBountyId();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidClaimId

Given Claim id is not existing.

```solidity
error Module__LM_PC_Bounty__InvalidClaimId();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidContributorsLength

Given Contributors list is empty.

```solidity
error Module__LM_PC_Bounty__InvalidContributorsLength();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidContributorAmount

Given claim Amount for contributor is zero.

```solidity
error Module__LM_PC_Bounty__InvalidContributorAmount();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidContributorAddress

Given Contributor address is invalid.

```solidity
error Module__LM_PC_Bounty__InvalidContributorAddress();
```

#### Module\_\_LM\_PC\_Bounty\_\_ClaimExceedsGivenPayoutAmounts

Given total claims of contributors exceed or are below the given payout amounts of the bounty.

```solidity
error Module__LM_PC_Bounty__ClaimExceedsGivenPayoutAmounts();
```

#### Module\_\_LM\_PC\_Bounty\_\_BountyLocked

Given Bounty id is Locked.

```solidity
error Module__LM_PC_Bounty__BountyLocked();
```

#### Module\_\_LM\_PC\_Bounty\_\_AlreadyClaimed

Given Claim id got already claimed.

```solidity
error Module__LM_PC_Bounty__AlreadyClaimed();
```

#### Module\_\_LM\_PC\_Bounty\_\_ContributorsChanged

The given Contributors are not the same as in the claim. This might be connected to a tried front run of the given transaction.

```solidity
error Module__LM_PC_Bounty__ContributorsChanged();
```

### Structs

#### Bounty

Struct used to store information about a bounty.

```solidity
struct Bounty {
    uint minimumPayoutAmount;
    uint maximumPayoutAmount;
    bytes details;
    bool locked;
}
```

**Properties**

| Name                  | Type      | Description                                                                   |
| --------------------- | --------- | ----------------------------------------------------------------------------- |
| `minimumPayoutAmount` | `uint256` | Minimum amount of tokens that can be paid out upon fulfillment of the bounty. |
| `maximumPayoutAmount` | `uint256` | Maximum amount of tokens that can be paid out upon fulfillment of the bounty. |
| `details`             | `bytes`   | Arbitrary data to store Bounty details if necessary. CAN be empty.            |
| `locked`              | `bool`    | If locked, the Bounty is no longer available for a claim.                     |

#### Contributor

Struct used to store information about a Bounty contributor.

```solidity
struct Contributor {
    address addr;
    uint claimAmount;
}
```

**Properties**

| Name          | Type      | Description                                                         |
| ------------- | --------- | ------------------------------------------------------------------- |
| `addr`        | `address` | The contributor's address.                                          |
| `claimAmount` | `uint256` | The amount of tokens the Contributor gets upon claiming the bounty. |

#### Claim

Struct used to store information about a Bounty Claim.

```solidity
struct Claim {
    uint bountyId;
    Contributor[] contributors;
    bytes details;
    bool claimed;
}
```

**Properties**

| Name           | Type            | Description                                                       |
| -------------- | --------------- | ----------------------------------------------------------------- |
| `bountyId`     | `uint256`       | The id of the bounty this claim belongs to.                       |
| `contributors` | `Contributor[]` | The contributors of the claim. MUST not be empty.                 |
| `details`      | `bytes`         | Arbitrary data to store Claim details if necessary. CAN be empty. |
| `claimed`      | `bool`          | Whether this Claim claimed its bounty already.                    |

**Inherits:** IERC20PaymentClientBase\_v1

### Functions

#### getBountyInformation

Returns the Bounty instance with id `id`.

```solidity
function getBountyInformation(uint bountyId)
    external
    view
    returns (Bounty memory);
```

**Parameters**

| Name       | Type      | Description                     |
| ---------- | --------- | ------------------------------- |
| `bountyId` | `uint256` | The id of the Bounty to return. |

**Returns**

| Name     | Type     | Description          |
| -------- | -------- | -------------------- |
| `<none>` | `Bounty` | Bounty with id `id`. |

#### listBountyIds

Returns total list of Bounty ids.

*List is in ascending order.*

```solidity
function listBountyIds() external view returns (uint[] memory);
```

**Returns**

| Name     | Type        | Description         |
| -------- | ----------- | ------------------- |
| `<none>` | `uint256[]` | List of Bounty ids. |

#### isExistingBountyId

Returns whether Bounty with id `id` exists.

```solidity
function isExistingBountyId(uint bountyId) external view returns (bool);
```

**Parameters**

| Name       | Type      | Description                   |
| ---------- | --------- | ----------------------------- |
| `bountyId` | `uint256` | The id of the Bounty to test. |

**Returns**

| Name     | Type   | Description                                         |
| -------- | ------ | --------------------------------------------------- |
| `<none>` | `bool` | True if Claim with id `id` exists, false otherwise. |

#### getClaimInformation

Returns the Claim instance with id `id`.

```solidity
function getClaimInformation(uint claimId)
    external
    view
    returns (Claim memory);
```

**Parameters**

| Name      | Type      | Description                    |
| --------- | --------- | ------------------------------ |
| `claimId` | `uint256` | The id of the Claim to return. |

**Returns**

| Name     | Type    | Description         |
| -------- | ------- | ------------------- |
| `<none>` | `Claim` | Claim with id `id`. |

#### listClaimIds

Returns total list of Claim ids.

*List is in ascending order.*

```solidity
function listClaimIds() external view returns (uint[] memory);
```

**Returns**

| Name     | Type        | Description        |
| -------- | ----------- | ------------------ |
| `<none>` | `uint256[]` | List of Claim ids. |

#### isExistingClaimId

Returns whether Claim with id `id` exists.

```solidity
function isExistingClaimId(uint claimId) external view returns (bool);
```

**Parameters**

| Name      | Type      | Description                   |
| --------- | --------- | ----------------------------- |
| `claimId` | `uint256` | The id of the Bounty to test. |

**Returns**

| Name     | Type   | Description                                         |
| -------- | ------ | --------------------------------------------------- |
| `<none>` | `bool` | True if Claim with id `id` exists, false otherwise. |

#### listClaimIdsForContributorAddress

Returns a list of Claim ids in which contributor Address is used.

*List is in ascending order.*

*Returns an empty .*

```solidity
function listClaimIdsForContributorAddress(address contributorAddrs)
    external
    view
    returns (uint[] memory);
```

**Parameters**

| Name               | Type      | Description                                        |
| ------------------ | --------- | -------------------------------------------------- |
| `contributorAddrs` | `address` | claim ids are filtered by the contributor address. |

**Returns**

| Name     | Type        | Description        |
| -------- | ----------- | ------------------ |
| `<none>` | `uint256[]` | List of Claim ids. |

#### addBounty

Adds a new Bounty.

*Reverts if an argument invalid.*

```solidity
function addBounty(
    uint minimumPayoutAmount,
    uint maximumPayoutAmount,
    bytes calldata details
) external returns (uint);
```

**Parameters**

| Name                  | Type      | Description                                                              |
| --------------------- | --------- | ------------------------------------------------------------------------ |
| `minimumPayoutAmount` | `uint256` | The minimum amount of tokens the Bounty will pay out upon being claimed. |
| `maximumPayoutAmount` | `uint256` | The maximum amount of tokens the Bounty will pay out upon being claimed. |
| `details`             | `bytes`   | The Bounty's details.                                                    |

**Returns**

| Name     | Type      | Description                |
| -------- | --------- | -------------------------- |
| `<none>` | `uint256` | The newly added Bounty id. |

#### addBountyBatch

Adds a new array of Bounties.

*Reverts if an argument invalid.*

```solidity
function addBountyBatch(
    uint[] calldata minimumPayoutAmounts,
    uint[] calldata maximumPayoutAmounts,
    bytes[] calldata detailArray
) external returns (uint[] memory ids);
```

**Parameters**

| Name                   | Type        | Description                                                                      |
| ---------------------- | ----------- | -------------------------------------------------------------------------------- |
| `minimumPayoutAmounts` | `uint256[]` | The array of minimum amount of tokens the Bounty will pay out upon being claimed |
| `maximumPayoutAmounts` | `uint256[]` | The array of maximum amount of tokens the Bounty will pay out upon being claimed |
| `detailArray`          | `bytes[]`   | The array of Bounty's details.                                                   |

**Returns**

| Name  | Type        | Description                          |
| ----- | ----------- | ------------------------------------ |
| `ids` | `uint256[]` | The newly added array of Bounty ids. |

#### updateBounty

Updates a Bounty's informations.

*Reverts if an argument invalid.*

```solidity
function updateBounty(uint bountyId, bytes calldata details) external;
```

**Parameters**

| Name       | Type      | Description                                |
| ---------- | --------- | ------------------------------------------ |
| `bountyId` | `uint256` | The id of the Bounty that will be updated. |
| `details`  | `bytes`   | The Bounty's details.                      |

#### lockBounty

Locks the Bounty so it cant be claimed.

*Only callable by authorized addresses.*

*Reverts if id invalid.*

```solidity
function lockBounty(uint bountyId) external;
```

**Parameters**

| Name       | Type      | Description                               |
| ---------- | --------- | ----------------------------------------- |
| `bountyId` | `uint256` | The id of the Bounty that will be locked. |

#### addClaim

Adds a new Claim.

*Reverts if an argument invalid.*

```solidity
function addClaim(
    uint bountyId,
    Contributor[] calldata contributors,
    bytes calldata details
) external returns (uint);
```

**Parameters**

| Name           | Type            | Description                                 |
| -------------- | --------------- | ------------------------------------------- |
| `bountyId`     | `uint256`       | The id of the bounty this claim belongs to. |
| `contributors` | `Contributor[]` | The contributor information for the Claim.  |
| `details`      | `bytes`         | The Claim's details.                        |

**Returns**

| Name     | Type      | Description                 |
| -------- | --------- | --------------------------- |
| `<none>` | `uint256` | The newly added Claim's id. |

#### updateClaimContributors

Updates a Claim's contributor informations.

*Reverts if an argument invalid.*

```solidity
function updateClaimContributors(
    uint claimId,
    Contributor[] calldata contributors
) external;
```

**Parameters**

| Name           | Type            | Description                                |
| -------------- | --------------- | ------------------------------------------ |
| `claimId`      | `uint256`       | The id of the Claim that will be updated.  |
| `contributors` | `Contributor[]` | The contributor information for the Claim. |

#### updateClaimDetails

Updates a Claim Details.

```solidity
function updateClaimDetails(uint claimId, bytes calldata details) external;
```

**Parameters**

| Name      | Type      | Description                               |
| --------- | --------- | ----------------------------------------- |
| `claimId` | `uint256` | The id of the Claim that will be updated. |
| `details` | `bytes`   | The Claim's details.                      |

#### verifyClaim

Completes a Bounty by verifying a claim.

*Only callable by authorized addresses.*

*Reverts if id invalid.*

*contributors should be copied out of the given Claim. The parameter is used to prevent front running.*

```solidity
function verifyClaim(uint claimId, Contributor[] calldata contributors)
    external;
```

**Parameters**

| Name           | Type            | Description                                         |
| -------------- | --------------- | --------------------------------------------------- |
| `claimId`      | `uint256`       | The id of the Claim that wants to claim the Bounty. |
| `contributors` | `Contributor[]` | The contributor information for the Claim.          |

### Events

#### BountyAdded

Event emitted when a new Bounty is added.

```solidity
event BountyAdded(
    uint indexed bountyId,
    uint minimumPayoutAmount,
    uint maximumPayoutAmount,
    bytes details
);
```

**Parameters**

| Name                  | Type      | Description                                                              |
| --------------------- | --------- | ------------------------------------------------------------------------ |
| `bountyId`            | `uint256` | The id of the newly added Bounty.                                        |
| `minimumPayoutAmount` | `uint256` | The minimum amount of tokens the Bounty will pay out upon being claimed. |
| `maximumPayoutAmount` | `uint256` | The maximum amount of tokens the Bounty will pay out upon being claimed. |
| `details`             | `bytes`   | The Bounty's details.                                                    |

#### BountyUpdated

Event emitted when a Bounty got updated.

```solidity
event BountyUpdated(uint indexed bountyId, bytes details);
```

**Parameters**

| Name       | Type      | Description                   |
| ---------- | --------- | ----------------------------- |
| `bountyId` | `uint256` | The id of the updated Bounty. |
| `details`  | `bytes`   | The Bounty's details.         |

#### BountyLocked

Event emitted when a Bounty gets locked.

```solidity
event BountyLocked(uint indexed bountyId);
```

**Parameters**

| Name       | Type      | Description                  |
| ---------- | --------- | ---------------------------- |
| `bountyId` | `uint256` | The id of the locked Bounty. |

#### ClaimAdded

Event emitted when a new Claim is added.

```solidity
event ClaimAdded(
    uint indexed claimId,
    uint indexed bountyId,
    Contributor[] contributors,
    bytes details
);
```

**Parameters**

| Name           | Type            | Description                                |
| -------------- | --------------- | ------------------------------------------ |
| `claimId`      | `uint256`       | The id of the newly added Claim.           |
| `bountyId`     | `uint256`       | The id of the Bounty that got claimed.     |
| `contributors` | `Contributor[]` | The contributor information for the Claim. |
| `details`      | `bytes`         | The Claim's details.                       |

#### ClaimContributorsUpdated

Event emitted when Claim Contributors got updated.

```solidity
event ClaimContributorsUpdated(
    uint indexed claimId, Contributor[] contributors
);
```

**Parameters**

| Name           | Type            | Description                                |
| -------------- | --------------- | ------------------------------------------ |
| `claimId`      | `uint256`       | The id of the Claim that got updated.      |
| `contributors` | `Contributor[]` | The contributor information for the Claim. |

#### ClaimDetailsUpdated

Event emitted when Claim Details got updated.

```solidity
event ClaimDetailsUpdated(uint indexed claimId, bytes details);
```

**Parameters**

| Name      | Type      | Description                           |
| --------- | --------- | ------------------------------------- |
| `claimId` | `uint256` | The id of the Claim that got updated. |
| `details` | `bytes`   | The Claim's details.                  |

#### ClaimVerified

Event emitted when a Claim is verified.

```solidity
event ClaimVerified(uint indexed claimId);
```

**Parameters**

| Name      | Type      | Description                            |
| --------- | --------- | -------------------------------------- |
| `claimId` | `uint256` | The id of the Claim that got verified. |

### Errors

#### Module\_\_LM\_PC\_Bounty\_\_OnlyClaimContributor

Access only to addresses that are listed as contributors in the according claim.

```solidity
error Module__LM_PC_Bounty__OnlyClaimContributor();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidPayoutAmounts

Given payoutAmounts are either zero or maximumPayoutAmount is smaller than minimumPayoutAmount.

```solidity
error Module__LM_PC_Bounty__InvalidPayoutAmounts();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidArrayLengths

Given array lengths are invalid.

```solidity
error Module__LM_PC_Bounty__InvalidArrayLengths();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidBountyId

Given Bounty id is not existing.

```solidity
error Module__LM_PC_Bounty__InvalidBountyId();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidClaimId

Given Claim id is not existing.

```solidity
error Module__LM_PC_Bounty__InvalidClaimId();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidContributorsLength

Given Contributors list is empty.

```solidity
error Module__LM_PC_Bounty__InvalidContributorsLength();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidContributorAmount

Given claim Amount for contributor is zero.

```solidity
error Module__LM_PC_Bounty__InvalidContributorAmount();
```

#### Module\_\_LM\_PC\_Bounty\_\_InvalidContributorAddress

Given Contributor address is invalid.

```solidity
error Module__LM_PC_Bounty__InvalidContributorAddress();
```

#### Module\_\_LM\_PC\_Bounty\_\_ClaimExceedsGivenPayoutAmounts

Given total claims of contributors exceed or are below the given payout amounts of the bounty.

```solidity
error Module__LM_PC_Bounty__ClaimExceedsGivenPayoutAmounts();
```

#### Module\_\_LM\_PC\_Bounty\_\_BountyLocked

Given Bounty id is Locked.

```solidity
error Module__LM_PC_Bounty__BountyLocked();
```

#### Module\_\_LM\_PC\_Bounty\_\_AlreadyClaimed

Given Claim id got already claimed.

```solidity
error Module__LM_PC_Bounty__AlreadyClaimed();
```

#### Module\_\_LM\_PC\_Bounty\_\_ContributorsChanged

The given Contributors are not the same as in the claim. This might be connected to a tried front run of the given transaction.

```solidity
error Module__LM_PC_Bounty__ContributorsChanged();
```

### Structs

#### Bounty

Struct used to store information about a bounty.

```solidity
struct Bounty {
    uint minimumPayoutAmount;
    uint maximumPayoutAmount;
    bytes details;
    bool locked;
}
```

**Properties**

| Name                  | Type      | Description                                                                   |
| --------------------- | --------- | ----------------------------------------------------------------------------- |
| `minimumPayoutAmount` | `uint256` | Minimum amount of tokens that can be paid out upon fulfillment of the bounty. |
| `maximumPayoutAmount` | `uint256` | Maximum amount of tokens that can be paid out upon fulfillment of the bounty. |
| `details`             | `bytes`   | Arbitrary data to store Bounty details if necessary. CAN be empty.            |
| `locked`              | `bool`    | If locked, the Bounty is no longer available for a claim.                     |

#### Contributor

Struct used to store information about a Bounty contributor.

```solidity
struct Contributor {
    address addr;
    uint claimAmount;
}
```

**Properties**

| Name          | Type      | Description                                                         |
| ------------- | --------- | ------------------------------------------------------------------- |
| `addr`        | `address` | The contributor's address.                                          |
| `claimAmount` | `uint256` | The amount of tokens the Contributor gets upon claiming the bounty. |

#### Claim

Struct used to store information about a Bounty Claim.

```solidity
struct Claim {
    uint bountyId;
    Contributor[] contributors;
    bytes details;
    bool claimed;
}
```

**Properties**

| Name           | Type            | Description                                                       |
| -------------- | --------------- | ----------------------------------------------------------------- |
| `bountyId`     | `uint256`       | The id of the bounty this claim belongs to.                       |
| `contributors` | `Contributor[]` | The contributors of the claim. MUST not be empty.                 |
| `details`      | `bytes`         | Arbitrary data to store Claim details if necessary. CAN be empty. |
| `claimed`      | `bool`          | Whether this Claim claimed its bounty already.                    |
