Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var _aInt = 21;
- var _bools = [true, true, true];
- var brokenContract = web3.eth.contract([{"constant":true,"inputs":[],"name":"getBools","outputs":[{"name":"","type":"bool[3]"}],"type":"function"},{"constant":true,"inputs":[],"name":"aInt","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"type":"function"},{"inputs":[{"name":"_aInt","type":"uint256"},{"name":"_bools","type":"bool[3]"}],"type":"constructor"}]);
- var broken = brokenContract.new(
- _aInt,
- _bools,
- {
- from: web3.eth.accounts[0],
- data: '60606040526040516080806101f283395060e060405280519060008054600160a060020a0319163317905560018290556002600380828491602002820160005b83821115609657835183826101000a81548160ff021916908302179055509260200192600101602081600001049283019260010302603f565b505060c19291505b8082111560d357805460ff191681556001016080565b801560785782816101000a81549060ff02191690556001016020816000010492830192600103026096565b5050505061011b806100d76000396000f35b509056606060405260e060020a60003504631ebeb80b81146100315780633f6a39fa146100a257806341c0e1b5146100ab575b005b6100ed60c060405260606003815b600081526020019060019003908161003f575050604080518083019182905290600290600390826000855b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161006a5790505050505050905090565b61010f60015481565b61002f6000543373ffffffffffffffffffffffffffffffffffffffff908116911614156101195760005473ffffffffffffffffffffffffffffffffffffffff16ff5b6040518082606080838184600060046030f15090500191505060405180910390f35b6060908152602090f35b56',
- gas: 3000000
- }, function(e, contract){
- if (typeof contract.address != 'undefined') {
- console.log('Contract mined!\nBools given: ' + _bools + '\nBools stored: ' + contract.getBools());
- }
- })
- miner.start(); admin.sleepBlocks(1); miner.stop();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement