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

About Batch Transfer (ThirdWeb React v5) #5984

Open
emin-karadag opened this issue Jan 18, 2025 · 2 comments
Open

About Batch Transfer (ThirdWeb React v5) #5984

emin-karadag opened this issue Jan 18, 2025 · 2 comments

Comments

@emin-karadag
Copy link

Hello,
How can I send to multiple addresses using <TransactionButton/>?
I made sending to a single wallet as follows.

Link: https://portal.thirdweb.com/react/v5/components/TransactionButton

<TransactionButton
        transaction={async () => {
          if (!account)
            return;

          const transaction = transfer({
            contract,
            to: "0x613540d63666C26593Fce4694d10f7d5de76bdEd",
            amount: 0.1,
          });

          var result = await sendTransaction({ transaction, account });
        }}
        onClick={() => alert("Transaction is about to be sent")}
        onTransactionSent={(result) => {
          console.log("Transaction submitted", result);
        }}
        onTransactionConfirmed={(receipt) => {
          console.log("Transaction confirmed", receipt);
        }}
        onError={(error) => {
          console.log("Transaction error", error);
        }}
      >
        Confirm Transaction
</TransactionButton>

But can you show me an example of how I can do “Batch Transfer”? Unfortunately, the “Batch Transfer” examples in the Thirdweb document were not enough.

Thank you in advance.

Copy link

linear bot commented Jan 18, 2025

@Dranox-Hub
Copy link

Hello, How can I send to multiple addresses using <TransactionButton/>? I made sending to a single wallet as follows.

Link: https://portal.thirdweb.com/react/v5/components/TransactionButton

<TransactionButton
        transaction={async () => {
          if (!account)
            return;

          const transaction = transfer({
            contract,
            to: "0x613540d63666C26593Fce4694d10f7d5de76bdEd",
            amount: 0.1,
          });

          var result = await sendTransaction({ transaction, account });
        }}
        onClick={() => alert("Transaction is about to be sent")}
        onTransactionSent={(result) => {
          console.log("Transaction submitted", result);
        }}
        onTransactionConfirmed={(receipt) => {
          console.log("Transaction confirmed", receipt);
        }}
        onError={(error) => {
          console.log("Transaction error", error);
        }}
      >
        Confirm Transaction
</TransactionButton>

But can you show me an example of how I can do “Batch Transfer”? Unfortunately, the “Batch Transfer” examples in the Thirdweb document were not enough.

Thank you in advance.

Hello,

Thank you for contacting us. To get help with your inquiry,

Please use the following link: Help Center: Click Here and enter your Ticket ID: WB240.

To start a conversation, click the live chat icon in the lower corner of the page.

Our team will be pleased to assist you as quickly as possible.

Best Regards,
Support Team

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

No branches or pull requests

2 participants