Bounty Manager

Introduction

This guide focusses on the most common patterns of interactions with the Bounty Manager Module. Please refer to the Technical Reference section to see all public getters and setters.

Setup Requirements

The guide includes code snippets for Inverter Network's TypeScript SDK. Please refer to the relevant code snippets based on the SDK you are using.

  1. Set up Inverter Network SDK: Refer to the Quick Start guides for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.

  2. Deploy a Workflow: Refer to the Deploy a Workflow guide for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.

  3. Retrieve a deployed Workflow: Refer to the Operate a Workflow guide for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.

  • Optionally if your setup needs a specific contract: Refer to the Deploy a Contract Guide for detailed instructions. See the React SDK Guide or TypeScript SDK Guide for more information.

Managing Bounty Manager Roles

Managing roles for the Bounty Manager involves several steps, including reading role, generating role IDs, assigning roles, and revoking them.

Retrieving the roles

The Bounty Manager utilizes several roles to handle the issuance, verification, and claiming of bounties. The first step is to retrieve the available roles in the Bounty Manager, as demonstrated below:

const VERIFIER_ROLE = await workflow.optionalModule.LM_PC_Bounties_v1.read.VERIFIER_ROLE.run()

const BOUNTY_ISSUER_ROLE = await workflow.optionalModule.LM_PC_Bounties_v1.read.BOUNTY_ISSUER_ROLE.run()

const CLAIMANT_ROLE = await workflow.optionalModule.LM_PC_Bounties_v1.read.CLAIMANT_ROLE.run()

Check If User Has Module Roles

The following two-step process validates whether a given address has roles assigned to it:

Grant and Revoke Role

The following section demonstrates how to grant and revoke roles for a wallet address.

Bounty Creation

Add a Bounty

The following section explains how to add a bounty to the Bounty Manager:

Add Bounty in Batches

The following section explains how to add multiple bounties in batches

Read Bounty

The following section explains how to read a given bounty information based on the bountyId

Bounty Claim

Add Bounty Claim

The following section explains how to submit a bounty claim:

Read Bounty Claim

The following section explains how to read a submitted bounty claim

Verify Bounty Claim

Verify a Claim

The following section explains how to verify a claim providing the claimId and contributors as parameters:

Last updated