Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RohanNero committed Dec 28, 2023
1 parent 6f6e48b commit 09919a7
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,49 @@ This protocol currently lives on Ethereum Sepolia, Polygon, Polygon Mumbai, and

### Creator Flow

1. Creator constructs merkle leaves based on

- an NFT contract address
- a block starting number
- a block ending number
- the total number of NFTs

2. Creator constructs merkle tree using the leaves

3. Creator calls `createRewardEvent()` function in the `Claim.sol` contract with

- the merkle root
- an NFT contract address
- the creator address
- reward token address
- reward token amount
- a block starting number
- a block ending number
- the total number of NFTs
- the total number of blocks NFTs were held for

![creator flow diagram](/packages/nextjs/public/creatorFlow.jpg)

### User Flow

1. User creates merkle proof using

- user address
- reward event Id

2. Optional: User creates signature with

- the address of who will claim it
- the reward event Id
- the NFT token Id

3. User calls `claim()` or `claimWithSignature()` to claim their rewards with input
- the merkle proof
- the holder address
- the address to send rewards to
- the event Id
- the token Id
- the block you held your NFT until
- the signature if claiming from a different address from the holder

![user flow diagram](/packages/nextjs/public/userFlow.jpg)

0 comments on commit 09919a7

Please sign in to comment.