How to perform batch transfers using aptos-python-sdk? #713
Unanswered
CurryIsTheBestPlayer
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Discord user ID
No response
Describe your question in detail.
I'm using the aptos-python-sdk for a project, and I would like to perform batch transfers (i.e., send tokens to multiple addresses in one go).
I couldn't find a method for batch transactions in the SDK documentation.
Is there a recommended approach or function for doing this? Or should I manually send individual transactions in a loop?
Any guidance or examples would be greatly appreciated. Thank you!
What error, if any, are you getting?
No error. I just couldn't find a built-in method for batch transfers.
What have you tried or looked at? Or how can we reproduce the error?
I tried passing recipient_address and amount as a list into the parameters of EntryFunction.natural, like this:
entry_function = EntryFunction.natural( module, transfer, [], [ TransactionArgument(recipient_address, Serializer.struct), TransactionArgument(amount, Serializer.u64), ] )
Then I attempted to combine them into a single list to simulate batch input, but I got an error saying the parameter has no list method.
Is there a proper way to pass a list or vector of addresses and amounts for batch transfers?
Which operating system are you using?
Windows
Which SDK or tool are you using? (if any)
Python SDK
Describe your environment or tooling in detail
No response
Beta Was this translation helpful? Give feedback.
All reactions