3

I know that any kind of operation over a token is possible so long as you implement the smart contract that achieves what you desire. For example, a function multisend can be developed that allows sending to many destinations in one transaction.

But is there any ERC spec out there that defines the opposite? That is, sending a token from many addresses (if you own the private key of all of them, of course), each address containing some amount of that token, to one destination?

Thanks

knocte
  • 1,929
  • 1
  • 16
  • 28

2 Answers2

0

The ERC20 standard is sufficient to do what you want. Users will have to approve your smart contract to move their tokens, and you can define a receiveMultiple function in your contract that loops through a parameter that is an array of addresses and amounts to take from them

natewelch_
  • 12,021
  • 1
  • 29
  • 43
  • mmm, but the approve operation goes into one transaction itself, so this wouldn't allow saving fees which is the ultimate reason I wanted to do everything in one transaction – knocte Dec 13 '18 at 02:56
  • alternatively the token can have a signedTransfer that takes a signed message to transfer as authorization, but that wouldn't be work for contract that holds the tokens – natewelch_ Dec 13 '18 at 02:58
-1

Maybe your meaning is multi-signature.if so, there is a contract you can have a look.https://etherscan.io/address/0x851b7f3ab81bd8df354f0d7640efcd7288553419#code

skyge
  • 52
  • 1
  • 5
  • 1
    of course I don't mean multisig – knocte Dec 12 '18 at 10:33
  • 1
    I said many addresses, not many private keys (each address containing some token balance) – knocte Dec 12 '18 at 10:34
  • oh, I think many addresses send some token will generate many transactions, so these need many signature, I think it can not be completed by a contract. If you get what you want at last, you can tell me. – skyge Dec 12 '18 at 11:18