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
Thanks,
Dan
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
Thanks,
Dan
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.