Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7. List the members of the batch (read BatchRegistry contract) #4

Closed
edakturk14 opened this issue Sep 3, 2024 · 5 comments · Fixed by #29
Closed

7. List the members of the batch (read BatchRegistry contract) #4

edakturk14 opened this issue Sep 3, 2024 · 5 comments · Fixed by #29
Labels

Comments

@edakturk14
Copy link
Contributor

edakturk14 commented Sep 3, 2024

Goal

Show the current members of your batch in the app.

@arjanjohan
Copy link
Contributor

I made a start on it in this branch. I am using events to watch check-in's, and I am seeing one address checked in twice. How should we handle this? Just filter out duplicates before displaying them?

@arjanjohan
Copy link
Contributor

Also I just made a simple list of addresses, that link to builder profile. Maybe we could extract the ENS profile picture and display some nice cards instead. What do you guys think?

@danitome24
Copy link
Contributor

@arjanjohan The BatchRegistry.sol contract allows to checkIn multiple times but only the first time it will send you the reward. If you use events for checking who checkedIn, you can filer for wasFirstTime param equals true.

const {
  data: events,
  isLoading: isLoadingEvents,
  error: errorReadingEvents,
} = useScaffoldEventHistory({
  contractName: "BatchRegistry",
  eventName: "CheckedIn",
  fromBlock: 31231n,
  watch: true,
  filters: { first: true },
  blockData: true,
  transactionData: true,
  receiptData: true,
});

You will get wallets not duplicated I think. Hope it helps

@danitome24
Copy link
Contributor

@arjanjohan can you submit a PR so I can help you with the development process? What do you think about it?

@danitome24
Copy link
Contributor

danitome24 commented Sep 14, 2024

Hi, I started working on this issue. I will post a PR in case somebody else want to help :)

Related PR: #29

@derrekcoleman derrekcoleman linked a pull request Sep 25, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants