{"action":"opened","issue":{"url":"https://api.github.com/repos/max-block/questions/issues/4","repository_url":"https://api.github.com/repos/max-block/questions","labels_url":"https://api.github.com/repos/max-block/questions/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/max-block/questions/issues/4/comments","events_url":"https://api.github.com/repos/max-block/questions/issues/4/events","html_url":"https://github.com/max-block/questions/issues/4","id":284508815,"number":4,"title":"Is it possible to reduce the amount of gas for transferring Ether to multi accounts via smart contract?","user":{"login":"max-block","id":34456567,"avatar_url":"https://avatars2.githubusercontent.com/u/34456567?v=4","gravatar_id":"","url":"https://api.github.com/users/max-block","html_url":"https://github.com/max-block","followers_url":"https://api.github.com/users/max-block/followers","following_url":"https://api.github.com/users/max-block/following{/other_user}","gists_url":"https://api.github.com/users/max-block/gists{/gist_id}","starred_url":"https://api.github.com/users/max-block/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max-block/subscriptions","organizations_url":"https://api.github.com/users/max-block/orgs","repos_url":"https://api.github.com/users/max-block/repos","events_url":"https://api.github.com/users/max-block/events{/privacy}","received_events_url":"https://api.github.com/users/max-block/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-26T07:29:25Z","updated_at":"2017-12-26T07:29:25Z","closed_at":null,"author_association":"OWNER","body":"I want to transfer the same amount of ether to 100 different addresses.\r\nI'd like to reduce amount of gas for it.\r\n\r\nI tried to do it with such contract:\r\n\r\n```\r\ncontract MultiTransfer {\r\n  \r\n  function transferEther(uint amount, address[] users) public payable {\r\n    require(amount * users.length == msg.value);\r\n    for (uint i = 0; i < users.length; i++) {\r\n      users[i].transfer(amount);\r\n    }\r\n  }\r\n  \r\n}\r\n\r\n```\r\n\r\nAs result it requires 3422830 gas for tx with 100 addresses. ~ 34K gas per 1 address.\r\nBut it costs only 21K if transfer ether directly without contracts.\r\n\r\nSo smart contracts can't help to reduce gas for this task?\r\n"}}
{"actor":{"display_login":"max-block"}}