GoodDollar / GoodCollective

Monorepo for GoodCollective (Segmented UBI and Direct Payments Pool)
MIT License
3 stars 1 forks source link

Create Segmented UBI pool contract + SDK #199

Open decentralauren opened 2 months ago

decentralauren commented 2 months ago

Business Description

Create Segmented UBI pool contracts to support the Red Tent UBI MVP, and to act as the initial contracts for the Segmented UBI SDK

Detailed Description

For the Red Tent Segmented UBI, the following pools should be created.

Pool 1: Red Tent Women in Colombia

Pool Parameters

Pool Qualifications

Pool 2: Red Tent Women in Nigeria

Pool Parameters

Pool Qualifications

Acceptance Criteria

decentralauren commented 2 months ago

@sirpy finalizing this with Galia, but wanted to put on your radar :)

L03TJ3 commented 1 month ago

@sirpy would be helpful if the claim transaction logs for the pools have a claim-event similar to gd-ubi contract

this would make easier to build a 'recent claims' list, based on event hash (eg. like done in wallet for otpl events)

Just for reference:

export type PoolDetails = {
  claimAmount?: BigNumber;
  claimTime: Date; (currently there exists currentDay, periodStart. maybe can be combined in one method)
  claimCall: ("the current method name for UBI is 'claim'");
  contract/poolName?: string;
  isRegistered: boolean;
  description?: string (short subtitle copy, eg: Your Daily Ubi)
  icon?: string || url
};
sirpy commented 2 weeks ago

@decentralauren do we have tickets on the UI updates required for goodcollective to support this pools?

sirpy commented 2 weeks ago

@L03TJ3 i've released v1.1.0 of goodcollective-contracts and goodcollective-sdk the sdk has a method getMemberUBIPools (see scripts/createPool) on how it is used. regarding pooldescription icon etc, these should be read and cached by the app itself. getMemberUBIPools returns the ipfs hash of the json file with these details.

decentralauren commented 2 weeks ago

@sirpy they are WIP and will be added to the epic that this ticket also belongs to: https://github.com/GoodDollar/GoodCollective/issues/192