Created
March 24, 2016 15:04
-
-
Save LefterisJP/609253485912951a0e09 to your computer and use it in GitHub Desktop.
Buy tokens
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var amounts = $amounts; | |
var dao = web3.eth.contract($dao_abi).at('$dao_address'); | |
console.log("Buying DAO tokens"); | |
for (i = 0; i < eth.accounts.length; i++) { | |
web3.eth.sendTransaction({ | |
from:eth.accounts[i], | |
to: dao.address, | |
gas:200000, | |
value:web3.toWei(amounts[i], "ether") | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment