Created
March 24, 2016 15:06
-
-
Save LefterisJP/ad7b0769b7078c7e60df to your computer and use it in GitHub Desktop.
Once funding fails, ask for a refund
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
// since funding failed let's get a refund | |
var eth_balance_before_refund = []; | |
for (i = 0; i < eth.accounts.length; i++) { | |
eth_balance_before_refund.push(web3.fromWei(eth.getBalance(eth.accounts[i]))); | |
} | |
addToTest('eth_balance_before_refund', eth_balance_before_refund); | |
for (i = 0; i < eth.accounts.length; i++) { | |
dao.refund.sendTransaction({ | |
from:eth.accounts[i], | |
gas:200000 | |
}); | |
} | |
checkWork(); | |
// try to ask for a refund again and see if we get more (we shouldn't) | |
for (i = 0; i < eth.accounts.length; i++) { | |
dao.refund.sendTransaction({ | |
from:eth.accounts[i], | |
gas:200000 | |
}); | |
} | |
checkWork(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment