Logo

githoney-bounties

UnofficialPreliminary, reverse-engineered version published by the tx3 team for testing and exploration. It is not endorsed by the original protocol authors. Do not use in mainnet. • v0.1.0

About this Protocol

Escrow-based bounties on Cardano for open-source contributions: fund, assign, merge, and claim

Parties

The participants involved in this protocol's transactions.

vaultGitHoney Plutus validator address that locks the settings and bounty UTxOs.
adminGitHoney operator key. Signs `merge_bounty` and every `close_bounty_*` transaction.
contributorDeveloper assigned to a bounty who claims the reward once the work is merged.
githoneyGitHoney fee-collection wallet. Receives the creation fee and the merge reward fee.
sponsorThird party that tops up an existing bounty's reward via `add_bounty_rewards`.
maintainerRepository owner who creates and funds a bounty, and recovers funds if it is closed unassigned.

Environment

Configuration values required to execute this protocol's transactions.

admin_payment_keyAdmin payment credential (vkey hash) recorded in every bounty datum./$defs/Bytes
bounty_policy_idMinting policy id of the bounty NFT./$defs/Bytes
settings_refPublished GitHoney settings UTxO, referenced by every bounty transaction./$defs/UtxoRef

Transactions

The transactions defined in this protocol, with their parameters, inputs, and outputs.

claim_bounty

Contributor claims the full reward from a merged bounty and burns the bounty NFT.

Diagram

claim_bountybounty_idbounty_refmin_adasinceuntil contributor contributor funds bounty reward

Parameters

bounty_idBytesAsset name of the bounty NFT to burn.
bounty_refUtxoRefThe bounty UTxO being claimed.
min_adaIntMin-UTxO lovelace floor (unused in the body; kept for ABI stability).
sinceIntValidity-window lower bound (slot).
untilIntValidity-window upper bound (slot).

Inputs

fundscontributorwallet
bountyscript

Outputs

contributornono

close_bounty_assigned_sponsored

Admin closes an assigned-but-unmerged bounty that has sponsor funds: refund the maintainer, return min-ADA to maintainer and contributor, refund the sponsor's added tokens, and burn the bounty NFT.

Diagram

close_bounty_assigned_sponsoredbounty_idbounty_refmin_adarefundings_amountrefundings_asset_namerefundings_policy_idreward_amountreward_asset_namereward_policy_idsincetime_limituntil admin admin contributor maintainer sponsor funds bounty change deposit reward refund

Parameters

bounty_idBytesAsset name of the bounty NFT to burn.
bounty_refUtxoRefThe bounty UTxO being closed.
min_adaIntMin-UTxO lovelace returned to both maintainer and contributor.
refundings_amountIntAmount of sponsor tokens refunded to the sponsor.
refundings_asset_nameBytesAsset name of the sponsor's refunded token.
refundings_policy_idBytesPolicy id of the sponsor's refunded token.
reward_amountIntAmount of reward refunded to the maintainer.
reward_asset_nameBytesAsset name of the reward token.
reward_policy_idBytesPolicy id of the reward token.
sinceIntValidity-window lower bound (slot).
time_limitIntBounty deadline (validated against the validity window).
untilIntValidity-window upper bound (slot).

Inputs

fundsadminwallet
bountyscript

Outputs

maintainernono
contributornono
adminnono
sponsornono

assign_bug_bounty

Assign a reporter to a bug bounty. Same effect as `assign_bounty`, but the maintainer pays the min-ADA top-up while the reporter's credentials go into the datum.

Diagram

assign_bug_bountybounty_refcontributor_payment_credentialcontributor_stake_credentialinitial_fundsmin_adasinceuntil maintainer maintainer vault funds bounty change updated_bounty

Parameters

bounty_refUtxoRefThe bounty UTxO being assigned.
contributor_payment_credentialBytesReporter payment credential (vkey hash) written into the datum.
contributor_stake_credentialBytesReporter staking credential (vkey hash) written into the datum.
initial_fundsIntUpdated `initial_value` lovelace entry for the bounty datum.
min_adaIntMin-UTxO lovelace top-up added to the bounty output (paid by the maintainer).
sinceIntValidity-window lower bound (slot).
untilIntValidity-window upper bound (slot).

Inputs

fundsmaintainerwallet
bountyscript

Outputs

vaultyesno
maintainernono

close_bounty_unassigned

Admin closes a never-assigned bounty: refund the reward to the maintainer and burn the bounty NFT.

Diagram

close_bounty_unassignedbounty_idbounty_refmin_adareward_amountreward_asset_namereward_policy_idsincetime_limituntil admin admin maintainer funds bounty change reward

Parameters

bounty_idBytesAsset name of the bounty NFT to burn.
bounty_refUtxoRefThe bounty UTxO being closed.
min_adaIntMin-UTxO lovelace returned to the maintainer.
reward_amountIntAmount of reward refunded to the maintainer.
reward_asset_nameBytesAsset name of the reward token.
reward_policy_idBytesPolicy id of the reward token.
sinceIntValidity-window lower bound (slot).
time_limitIntBounty deadline (validated against the validity window).
untilIntValidity-window upper bound (slot).

Inputs

fundsadminwallet
bountyscript

Outputs

maintainernono
adminnono

merge_bounty

Admin marks the bounty merged, takes the GitHoney reward-fee cut, and returns the maintainer's min-ADA. After this the contributor can claim.

Diagram

merge_bountybounty_refgithoney_feeinitial_fundsmin_adareward_asset_namereward_policy_idscript_feesinceuntil admin admin githoney maintainer vault funds bounty change fee deposit updated_bounty

Parameters

bounty_refUtxoRefThe bounty UTxO being merged.
githoney_feeIntReward-token amount GitHoney takes as its fee.
initial_fundsIntUpdated `initial_value` lovelace entry for the bounty datum.
min_adaIntMin-UTxO lovelace returned to the maintainer.
reward_asset_nameBytesAsset name of the reward token the fee is taken from.
reward_policy_idBytesPolicy id of the reward token the fee is taken from.
script_feeIntScript-fee amount (unused in the body; kept for ABI stability).
sinceIntValidity-window lower bound (slot).
untilIntValidity-window upper bound (slot).

Inputs

fundsadminwallet
bountyscript

Outputs

vaultyesno
githoneynono
maintainernono
adminnono

close_bounty_unassigned_sponsored

Admin closes a never-assigned bounty that has sponsor funds: refund the maintainer, refund the sponsor's added tokens, and burn the bounty NFT.

Diagram

close_bounty_unassigned_sponsoredbounty_idbounty_refmin_adarefundings_amountrefundings_asset_namerefundings_policy_idreward_amountreward_asset_namereward_policy_idsincetime_limituntil admin admin maintainer sponsor funds bounty change reward refund

Parameters

bounty_idBytesAsset name of the bounty NFT to burn.
bounty_refUtxoRefThe bounty UTxO being closed.
min_adaIntMin-UTxO lovelace returned to the maintainer.
refundings_amountIntAmount of sponsor tokens refunded to the sponsor.
refundings_asset_nameBytesAsset name of the sponsor's refunded token.
refundings_policy_idBytesPolicy id of the sponsor's refunded token.
reward_amountIntAmount of reward refunded to the maintainer.
reward_asset_nameBytesAsset name of the reward token.
reward_policy_idBytesPolicy id of the reward token.
sinceIntValidity-window lower bound (slot).
time_limitIntBounty deadline (validated against the validity window).
untilIntValidity-window upper bound (slot).

Inputs

fundsadminwallet
bountyscript

Outputs

maintainernono
adminnono
sponsornono

create_bounty_with_lovelace

Create a bounty whose reward is ADA, minting the bounty NFT and paying the creation fee to GitHoney.

Diagram

create_bounty_with_lovelacebounty_idmaintainer_payment_keymaintainer_stake_keymin_adareward_amountsincetime_limituntil maintainer githoney maintainer vault funds fee change new_bounty

Parameters

bounty_idBytesAsset name of the bounty NFT to mint.
maintainer_payment_keyBytesMaintainer payment credential (vkey hash).
maintainer_stake_keyBytesMaintainer staking credential (vkey hash).
min_adaIntMin-UTxO lovelace floor for the bounty output.
reward_amountIntLovelace reward amount to lock.
sinceIntValidity-window lower bound (slot).
time_limitIntBounty deadline written into the datum.
untilIntValidity-window upper bound (slot).

Inputs

fundsmaintainerwallet

Outputs

vaultyesno
githoneynono
maintainernono

add_bounty_rewards

Sponsor tops up an existing bounty with additional reward tokens.

Diagram

add_bounty_rewardsbounty_refinitial_rewardsminAdareward_amountreward_asset_namereward_policy_idsinceuntil sponsor sponsor vault funds bounty change updated_bounty

Parameters

bounty_refUtxoRefThe bounty UTxO being topped up.
initial_rewardsIntUpdated `initial_value` lovelace entry for the bounty datum.
minAdaIntMin-UTxO lovelace floor (unused in the body; kept for ABI stability).
reward_amountIntAmount of reward token the sponsor adds.
reward_asset_nameBytesAsset name of the reward token.
reward_policy_idBytesPolicy id of the reward token.
sinceIntValidity-window lower bound (slot).
untilIntValidity-window upper bound (slot).

Inputs

fundssponsorwallet
bountyscript

Outputs

vaultyesno
sponsornono

close_bounty_assigned

Admin closes an assigned-but-unmerged bounty: refund the reward to the maintainer, return min-ADA to both maintainer and contributor, and burn the bounty NFT.

Diagram

close_bounty_assignedbounty_idbounty_refmin_adareward_amountreward_asset_namereward_policy_idsincetime_limituntil admin admin contributor maintainer funds bounty change deposit reward

Parameters

bounty_idBytesAsset name of the bounty NFT to burn.
bounty_refUtxoRefThe bounty UTxO being closed.
min_adaIntMin-UTxO lovelace returned to both maintainer and contributor.
reward_amountIntAmount of reward refunded to the maintainer.
reward_asset_nameBytesAsset name of the reward token.
reward_policy_idBytesPolicy id of the reward token.
sinceIntValidity-window lower bound (slot).
time_limitIntBounty deadline (validated against the validity window).
untilIntValidity-window upper bound (slot).

Inputs

fundsadminwallet
bountyscript

Outputs

maintainernono
contributornono
adminnono

assign_bounty

Contributor assigns themselves to a bounty, topping up its min-ADA and writing their address into the datum. The contributor funds the top-up.

Diagram

assign_bountybounty_refcontributor_payment_credentialcontributor_stake_credentialinitial_fundsmin_adasinceuntil contributor contributor vault funds bounty change updated_bounty

Parameters

bounty_refUtxoRefThe bounty UTxO being assigned.
contributor_payment_credentialBytesContributor payment credential (vkey hash) written into the datum.
contributor_stake_credentialBytesContributor staking credential (vkey hash) written into the datum.
initial_fundsIntUpdated `initial_value` lovelace entry for the bounty datum.
min_adaIntMin-UTxO lovelace top-up added to the bounty output.
sinceIntValidity-window lower bound (slot).
untilIntValidity-window upper bound (slot).

Inputs

fundscontributorwallet
bountyscript

Outputs

vaultyesno
contributornono

create_bounty_with_token

Create a bounty whose reward is a native token, minting the bounty NFT and paying the creation fee to GitHoney.

Diagram

create_bounty_with_tokenbounty_idmaintainer_payment_keymaintainer_stake_keymin_adareward_amountreward_asset_namereward_policy_idsincetime_limituntil maintainer githoney maintainer vault funds fee change new_bounty

Parameters

bounty_idBytesAsset name of the bounty NFT to mint.
maintainer_payment_keyBytesMaintainer payment credential (vkey hash).
maintainer_stake_keyBytesMaintainer staking credential (vkey hash).
min_adaIntMin-UTxO lovelace floor for the bounty output.
reward_amountIntAmount of the reward token to lock.
reward_asset_nameBytesAsset name of the reward token.
reward_policy_idBytesPolicy id of the reward token.
sinceIntValidity-window lower bound (slot).
time_limitIntBounty deadline written into the datum.
untilIntValidity-window upper bound (slot).

Inputs

fundsmaintainerwallet

Outputs

vaultyesno
githoneynono
maintainernono

Profiles

Pre-configured sets of environment and party values for different deployment targets.

preprod
admin_payment_key0x42704da3a869894da8e24185fc36fdbd82f6092c85a17b5fc6e52213env
bounty_policy_id0xe9397bda221be6f98ec3a292a6d3957a633dc226bc48838768170c12env
settings_ref9edc3087527514724b297475f84a8ab316faab1950ce1882715cf4bf88b20b64#0env
Back to all Protocols