Skip to content

Commit

Permalink
First issue
Browse files Browse the repository at this point in the history
  • Loading branch information
canepat committed Aug 19, 2020
0 parents commit ceea670
Show file tree
Hide file tree
Showing 10 changed files with 53,732 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Buidler files
cache
artifacts
node_modules

# VSCode
ethereum-multi-send.code-workspace
22 changes: 22 additions & 0 deletions buidler.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
usePlugin("@nomiclabs/buidler-truffle5");

// This is a sample Buidler task. To learn how to create your own go to
// https://buidler.dev/guides/create-task.html
task("accounts", "Prints the list of accounts", async () => {
const accounts = await web3.eth.getAccounts();

for (const account of accounts) {
console.log(account);
}
});

module.exports = {
defaultNetwork: "buidlerevm",
solc: {
version: "0.5.16",
optimizer: {
enabled: true,
runs: 200
}
}
};
14 changes: 14 additions & 0 deletions contracts/MultiTransferEther.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pragma solidity ^0.5.15;

contract MultiTransferEther {
constructor(address payable account, address payable[] memory recipients, uint256[] memory amounts) public payable {
require(account != address(0), "MultiTransfer: account is the zero address");
require(recipients.length > 0, "MultiTransfer: recipients length is zero");
require(recipients.length == amounts.length, "MultiTransfer: size of recipients and amounts is not the same");

for (uint256 i = 0; i < recipients.length; i++) {
recipients[i].transfer(amounts[i]);
}
selfdestruct(account);
}
}
Loading

0 comments on commit ceea670

Please sign in to comment.