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

C&p GS code and simplified it #6

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

C&p GS code and simplified it #6

wants to merge 7 commits into from

Conversation

0xKurt
Copy link
Member

@0xKurt 0xKurt commented Nov 27, 2024

usage example:

import { WalletClient } from "viem";

const walletClient = new WalletClient({
  // wallet client initialization
});

const reviewRecipientsInstance = reviewRecipients(
  {
    roundId: "1",
    strategyAddress: "0xYourStrategyAddress",
    applicationsToUpdate: [
      { index: 0, status: ApplicationStatus.APPROVED },
      { index: 1, status: ApplicationStatus.REJECTED },
    ],
    currentApplications: [
      { index: 0, status: ApplicationStatus.PENDING },
      { index: 1, status: ApplicationStatus.PENDING },
    ],
    strategy: RoundCategory.QuadraticFunding,
  },
  1, // chainId
  walletClient
);

reviewRecipientsInstance.on("transaction", (event) => {
  console.log("Transaction event:", event);
});

reviewRecipientsInstance.on("transactionStatus", (event) => {
  console.log("Transaction status:", event);
});

reviewRecipientsInstance.on("indexingStatus", (event) => {
  console.log("Indexing status:", event);
});

Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
checker ❌ Failed (Inspect) Nov 28, 2024 11:06am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants