Skip to content

Instantly share code, notes, and snippets.

@LefterisJP
Created March 24, 2016 15:04
Show Gist options
  • Save LefterisJP/609253485912951a0e09 to your computer and use it in GitHub Desktop.
Save LefterisJP/609253485912951a0e09 to your computer and use it in GitHub Desktop.
Buy tokens
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