ILM_PC_Bounties_v1.sol

ILM_PC_Bounties_v1

Git Sourcearrow-up-right

Inherits: IERC20PaymentClientBase_v1

Functions

getBountyInformation

Returns the Bounty instance with id id.

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.

Returns

Name
Type
Description

<none>

uint256[]

List of Bounty ids.

isExistingBountyId

Returns whether Bounty with id id exists.

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.

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.

Returns

Name
Type
Description

<none>

uint256[]

List of Claim ids.

isExistingClaimId

Returns whether Claim with id id exists.

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 .

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Parameters

Name
Type
Description

bountyId

uint256

The id of the locked Bounty.

ClaimAdded

Event emitted when a new Claim is added.

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.

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.

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.

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.

Module__LM_PC_Bounty__InvalidPayoutAmounts

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

Module__LM_PC_Bounty__InvalidArrayLengths

Given array lengths are invalid.

Module__LM_PC_Bounty__InvalidBountyId

Given Bounty id is not existing.

Module__LM_PC_Bounty__InvalidClaimId

Given Claim id is not existing.

Module__LM_PC_Bounty__InvalidContributorsLength

Given Contributors list is empty.

Module__LM_PC_Bounty__InvalidContributorAmount

Given claim Amount for contributor is zero.

Module__LM_PC_Bounty__InvalidContributorAddress

Given Contributor address is invalid.

Module__LM_PC_Bounty__ClaimExceedsGivenPayoutAmounts

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

Module__LM_PC_Bounty__BountyLocked

Given Bounty id is Locked.

Module__LM_PC_Bounty__AlreadyClaimed

Given Claim id got already claimed.

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.

Structs

Bounty

Struct used to store information about a bounty.

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.

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.

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.

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.

Returns

Name
Type
Description

<none>

uint256[]

List of Bounty ids.

isExistingBountyId

Returns whether Bounty with id id exists.

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.

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.

Returns

Name
Type
Description

<none>

uint256[]

List of Claim ids.

isExistingClaimId

Returns whether Claim with id id exists.

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 .

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Parameters

Name
Type
Description

bountyId

uint256

The id of the locked Bounty.

ClaimAdded

Event emitted when a new Claim is added.

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.

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.

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.

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.

Module__LM_PC_Bounty__InvalidPayoutAmounts

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

Module__LM_PC_Bounty__InvalidArrayLengths

Given array lengths are invalid.

Module__LM_PC_Bounty__InvalidBountyId

Given Bounty id is not existing.

Module__LM_PC_Bounty__InvalidClaimId

Given Claim id is not existing.

Module__LM_PC_Bounty__InvalidContributorsLength

Given Contributors list is empty.

Module__LM_PC_Bounty__InvalidContributorAmount

Given claim Amount for contributor is zero.

Module__LM_PC_Bounty__InvalidContributorAddress

Given Contributor address is invalid.

Module__LM_PC_Bounty__ClaimExceedsGivenPayoutAmounts

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

Module__LM_PC_Bounty__BountyLocked

Given Bounty id is Locked.

Module__LM_PC_Bounty__AlreadyClaimed

Given Claim id got already claimed.

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.

Structs

Bounty

Struct used to store information about a bounty.

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.

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.

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.

Last updated