Do you know how Xenon smart contract accomplished sending token to multiple ETH addresses at once like in this transaction: https://etherscan.io/tx/0xb017eadfd9732efc93238ba12e2c52500dda0f2a7ede66f91f15fb2f702c1760




If you look at the destination of the transaction, it is a contract. That particular contract has a function whose signature is multisend(address _tokenAddr, address[] dests, uint256[] values) (see contract source). By iterating through the input arrays, the function invokes the transfer function multiple times. The transaction you linked to invokes the multisend function and is thus able to transfer tokens to many wallets at once.


Completely agree with @lungj. I would add a word of caution.

"Talking" to multiple untrusted contracts in a single transaction is an anti-pattern.

From a quick glance at the contract, it appears to be wide open to DoS attack. I wouldn't recommend that pattern unless you are quite sure you understand the attack vector and there is something else mitigating the risk.

Hope it helps.

  • Thanks @Rob Hitchens! I'm interested in hiring someone to implement this for an existing smart contract I have. Could you email me at dgimness@gmail.com if you're available? Sorry, but I can't private message on here. – gold digger Oct 27 '17 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.