Batch Tranfers for External Tokens
Last updated
Was this helpful?
Last updated
Was this helpful?
Batch transfers are a feature in AO token contracts that let a process transfer tokens to multiple recipients in one message, instead of sending a separate message for each transfer. This is especially useful for large-scale distributions, like airdrops and rewards.
For developers you can run this script on your process (please review the batch transfer script before loading it):
This script is intended as a general-purpose extension. If your token has custom logic, you may need to replicate your custom logic inside the batch transfer handler to preserve expected behavior.
Use the provided code as a starting point, and modify as necessary to ensure compatibility with your process.
There are multiple ways to run this on the process:
aos
into process, .editor
, paste the code, .done
aos
into process, .load
with a path to a local file that contains the code
run local aoconnect
script that sends an Eval
message to the process, with the Data
containing this code
Transfer without credit notices