status-network-token/sgtGeneration/deploy_test.js

44 lines
41 KiB
JavaScript

var minimeFactoryAbi = [{"constant":false,"inputs":[{"name":"_parentToken","type":"address"},{"name":"_snapshotBlock","type":"uint256"},{"name":"_tokenName","type":"string"},{"name":"_decimalUnits","type":"uint8"},{"name":"_tokenSymbol","type":"string"},{"name":"_transfersEnabled","type":"bool"}],"name":"createCloneToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"}];
var minimeFactoryContract = web3.eth.contract(minimeFactoryAbi);
var minimeFactory = minimeFactoryContract.new(
{
from: web3.eth.accounts[0],
data: '0x6060604052341561000c57fe5b5b611e968061001c6000396000f300606060405263ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416635b7b72c1811461003a575bfe5b341561004257fe5b604080516020600460443581810135601f81018490048402850184019095528484526100e6948235600160a060020a031694602480359560649492939190920191819084018382808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989a60ff8b35169a9099940197509195509182019350915081908401838280828437509496505050509135151591506101029050565b60408051600160a060020a039092168252519081900360200190f35b60006000308888888888886101156102db565b600160a060020a03808916825287166020808301919091526040820187905260ff8516608083015282151560c083015260e0606083018181528751918401919091528651909160a08401916101008501918901908083838215610193575b80518252602083111561019357601f199092019160209182019101610173565b505050905090810190601f1680156101bf5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838382156101fe575b8051825260208311156101fe57601f1990920191602091820191016101de565b505050905090810190601f16801561022a5780820380516001836020036101000a031916815260200191505b509950505050505050505050604051809103906000f080151561024957fe5b905080600160a060020a0316633cebb823336040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050600060405180830381600087803b15156102bb57fe5b6102c65a03f115156102c957fe5b5050508091505b509695505050505050565b604051611b7f806102ec83390190560060a0604052600760608190527f4d4d545f302e3100000000000000000000000000000000000000000000000000608090815262000040916004919062000146565b5034156200004a57fe5b60405162001b7f38038062001b7f83398101604090815281516020830151918301516060840151608085015160a086015160c0870151949693949284019391929101905b5b60008054600160a060020a03191633600160a060020a03161790555b600b805461010060a860020a031916610100600160a060020a038a16021790558351620000e090600190602087019062000146565b506002805460ff191660ff851617905581516200010590600390602085019062000146565b5060058054600160a060020a031916600160a060020a0388161790556006859055600b805460ff1916821515179055436007555b50505050505050620001f0565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200018957805160ff1916838001178555620001b9565b82800160010185558215620001b9579182015b82811115620001b95782518255916020019190600101906200019c565b5b50620001c8929150620001cc565b5090565b620001ed91905b80821115620001c85760008155600101620001d3565b5090565b90565b61197f80620002006000396000f300606060405236156101225763ffffffff60e060020a60003504166306fdde0381146101e1578063095ea7b31461027157806317634514146102a457806318160ddd146102c657806323b872dd146102e8578063313ce567146103215780633cebb823146103475780634ee2cd7e1461036557806354fd4d50146103965780636638c0871461042657806370a08231146104e657806380a5400114610514578063827f32c01461054057806395d89b4114610573578063981b24d014610603578063a9059cbb14610628578063bef97c871461065b578063c5bcc4f11461067f578063cae9ca51146106a1578063d3ce77fe14610718578063dd62ed3e1461074b578063e77772fe1461077f578063f41e60c5146107ab578063f77c4791146107c2575b6101df5b60005461013b90600160a060020a03166107ee565b156101d657600080546040805160209081019390935280517ff48c3054000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301529151919092169263f48c30549234926024808301939282900301818588803b15156101ad57fe5b6125ee5a03f115156101bb57fe5b505060405151151591506101d190505760006000fd5b6101dc565b60006000fd5b5b565b005b34156101e957fe5b6101f161081b565b604080516020808252835181830152835191928392908301918501908083838215610237575b80518252602083111561023757601f199092019160209182019101610217565b505050905090810190601f1680156102635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561027957fe5b610290600160a060020a03600435166024356108a8565b604080519115158252519081900360200190f35b34156102ac57fe5b6102b4610a1a565b60408051918252519081900360200190f35b34156102ce57fe5b6102b4610a20565b60408051918252519081900360200190f35b34156102f057fe5b610290600160a060020a0360043581169060243516604435610a31565b604080519115158252519081900360200190f35b341561032957fe5b610331610ad4565b6040805160ff9092168252519081900360200190f35b341561034f57fe5b6101df600160a060020a0360043516610add565b005b341561036d57fe5b6102b4600160a060020a0360043516602435610b26565b60408051918252519081900360200190f35b341561039e57fe5b6101f1610c72565b604080516020808252835181830152835191928392908301918501908083838215610237575b80518252602083111561023757601f199092019160209182019101610217565b505050905090810190601f1680156102635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561042e57fe5b6104ca600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989a60ff8b35169a909994019750919550918201935091508190840183828082843750949650508435946020013515159350610d0092505050565b60408051600160a060020a039092168252519081900360200190f35b34156104ee57fe5b6102b4600160a060020a0360043516610f60565b60408051918252519081900360200190f35b341561051c57fe5b6104ca610f74565b60408051600160a060020a039092168252519081900360200190f35b341561054857fe5b610290600160a060020a0360043516602435610f83565b604080519115158252519081900360200190f35b341561057b57fe5b6101f161105c565b604080516020808252835181830152835191928392908301918501908083838215610237575b80518252602083111561023757601f199092019160209182019101610217565b505050905090810190601f1680156102635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561060b57fe5b6102b46004356110ea565b60408051918252519081900360200190f35b341561063057fe5b610290600160a060020a03600435166024356111dc565b604080519115158252519081900360200190f35b341561066357fe5b610290611205565b604080519115158252519081900360200190f35b341561068757fe5b6102b461120e565b60408051918252519081900360200190f35b34156106a957fe5b604080516020600460443581810135601f8101849004840285018401909552848452610290948235600160a060020a031694602480359560649492939190920191819084018382808284375094965061121495505050505050565b604080519115158252519081900360200190f35b341561072057fe5b610290600160a060020a0360043516602435611339565b604080519115158252519081900360200190f35b341561075357fe5b6102b4600160a060020a036004358116906024351661140e565b60408051918252519081900360200190f35b341561078757fe5b6104ca61143b565b60408051600160a060020a039092168252519081900360200190f35b34156107b357fe5b6101df600435151561144f565b005b34156107ca57fe5b6104ca61147e565b60408051600160a060020a039092168252519081900360200190f35b600080600160a060020a038316151561080a5760009150610815565b823b90506000811191505b50919050565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108a05780601f10610875576101008083540402835291602001916108a0565b820191906000526020600020905b81548152906001019060200180831161088357829003601f168201915b505050505081565b600b5460009060ff1615156108bd5760006000fd5b81158015906108f05750600160a060020a0333811660009081526009602090815260408083209387168352929052205415155b156108fb5760006000fd5b60005461091090600160a060020a03166107ee565b156109b2576000805460408051602090810184905281517fda682aeb000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301528881166024830152604482018890529251929093169363da682aeb9360648082019492918390030190829087803b151561099057fe5b6102c65a03f1151561099e57fe5b505060405151151590506109b25760006000fd5b5b600160a060020a03338116600081815260096020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b92915050565b60075481565b6000610a2b436110ea565b90505b90565b6000805433600160a060020a03908116911614610abf57600b5460ff161515610a5a5760006000fd5b600160a060020a038085166000908152600960209081526040808320339094168352929052205482901015610a9157506000610acd565b600160a060020a03808516600090815260096020908152604080832033909416835292905220805483900390555b610aca84848461148d565b90505b9392505050565b60025460ff1681565b60005433600160a060020a03908116911614610af95760006000fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600160a060020a0382166000908152600860205260408120541580610b865750600160a060020a038316600090815260086020526040812080548492908110610b6b57fe5b906000526020600020900160005b50546001608060020a0316115b15610c4257600554600160a060020a031615610c3557600554600654600160a060020a0390911690634ee2cd7e908590610bc1908690611675565b6000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1515610c1857fe5b6102c65a03f11515610c2657fe5b5050604051519150610a149050565b506000610a14565b610a14565b600160a060020a0383166000908152600860205260409020610c64908361168f565b9050610a14565b5b92915050565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108a05780601f10610875576101008083540402835291602001916108a0565b820191906000526020600020905b81548152906001019060200180831161088357829003601f168201915b505050505081565b600080831515610d0e574393505b600b60019054906101000a9004600160a060020a0316600160a060020a0316635b7b72c130868a8a8a896000604051602001526040518763ffffffff1660e060020a0281526004018087600160a060020a0316600160a060020a03168152602001868152602001806020018560ff1660ff1681526020018060200184151515158152602001838103835287818151815260200191508051906020019080838360008314610dd6575b805182526020831115610dd657601f199092019160209182019101610db6565b505050905090810190601f168015610e025780820380516001836020036101000a031916815260200191505b5083810382528551815285516020918201918701908083838215610e41575b805182526020831115610e4157601f199092019160209182019101610e21565b505050905090810190601f168015610e6d5780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b1515610e8e57fe5b6102c65a03f11515610e9c57fe5b50506040805180517f3cebb823000000000000000000000000000000000000000000000000000000008252600160a060020a03338116600484015292519094509184169250633cebb82391602480830192600092919082900301818387803b1515610f0357fe5b6102c65a03f11515610f1157fe5b5050604080518681529051600160a060020a03841692507f086c875b377f900b07ce03575813022f05dd10ed7640b5282cf6d3c3fc352ade9181900360200190a28091505b5095945050505050565b6000610f6c8243610b26565b90505b919050565b600554600160a060020a031681565b600080548190819033600160a060020a03908116911614610fa45760006000fd5b610faf600a4361168f565b9150818483011015610fc15760006000fd5b610fce600a858401611805565b610fd785610f60565b9050808482011015610fe95760006000fd5b600160a060020a038516600090815260086020526040902061100d90828601611805565b604080518581529051600160a060020a038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3600192505b5b505092915050565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108a05780601f10610875576101008083540402835291602001916108a0565b820191906000526020600020905b81548152906001019060200180831161088357829003601f168201915b505050505081565b600a546000901580611123575081600a600081548110151561110857fe5b906000526020600020900160005b50546001608060020a0316115b156111c457600554600160a060020a0316156111b757600554600654600160a060020a039091169063981b24d09061115c908590611675565b6000604051602001526040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b151561119a57fe5b6102c65a03f115156111a857fe5b5050604051519150610f6f9050565b506000610f6f565b610f6f565b6111cf600a8361168f565b9050610f6f565b5b919050565b600b5460009060ff1615156111f15760006000fd5b6111fc33848461148d565b90505b92915050565b600b5460ff1681565b60065481565b600061122084846108a8565b151561122c5760006000fd5b83600160a060020a0316638f4ffcb1338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383600083146112d2575b8051825260208311156112d257601f1990920191602091820191016112b2565b505050905090810190601f1680156112fe5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b151561131c57fe5b6102c65a03f1151561132a57fe5b505050600190505b9392505050565b600080548190819033600160a060020a0390811691161461135a5760006000fd5b611365600a4361168f565b9150838210156113755760006000fd5b611382600a858403611805565b61138b85610f60565b90508381101561139b5760006000fd5b600160a060020a03851660009081526008602052604090206113bf90858303611805565b604080518581529051600091600160a060020a038816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3600192505b5b505092915050565b600160a060020a038083166000908152600960209081526040808320938516835292905220545b92915050565b600b546101009004600160a060020a031681565b60005433600160a060020a0390811691161461146b5760006000fd5b600b805460ff19168215151790555b5b50565b600054600160a060020a031681565b600080808315156114a1576001925061166c565b6006544390106114b15760006000fd5b600160a060020a03851615806114d8575030600160a060020a031685600160a060020a0316145b156114e35760006000fd5b6114ed8643610b26565b915083821015611500576000925061166c565b60005461151590600160a060020a03166107ee565b156115b7576000805460408051602090810184905281517f4a393149000000000000000000000000000000000000000000000000000000008152600160a060020a038b811660048301528a81166024830152604482018a905292519290931693634a3931499360648082019492918390030190829087803b151561159557fe5b6102c65a03f115156115a357fe5b505060405151151590506115b75760006000fd5b5b600160a060020a03861660009081526008602052604090206115dc90858403611805565b6115e68543610b26565b90508084820110156115f85760006000fd5b600160a060020a038516600090815260086020526040902061161c90828601611805565b84600160a060020a031686600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3600192505b50509392505050565b600081831061168457816111fc565b825b90505b92915050565b60006000600060008580549050600014156116ad57600093506117fc565b8554869060001981019081106116bf57fe5b906000526020600020900160005b50546001608060020a03168510611724578554869060001981019081106116f057fe5b906000526020600020900160005b505470010000000000000000000000000000000090046001608060020a031693506117fc565b85600081548110151561173357fe5b906000526020600020900160005b50546001608060020a031685101561175c57600093506117fc565b8554600093506000190191505b828211156117be5760026001838501015b04905084868281548110151561178c57fe5b906000526020600020900160005b50546001608060020a0316116117b2578092506117b9565b6001810391505b611769565b85838154811015156117cc57fe5b906000526020600020900160005b505470010000000000000000000000000000000090046001608060020a031693505b50505092915050565b8154600090819015806118425750835443908590600019810190811061182757fe5b906000526020600020900160005b50546001608060020a0316105b156118b857835484906118588260018301611908565b8154811061186257fe5b906000526020600020900160005b5080546001608060020a03858116700100000000000000000000000000000000024382166fffffffffffffffffffffffffffffffff1990931692909217161781559150611901565b8354849060001981019081106118ca57fe5b906000526020600020900160005b5080546001608060020a0380861670010000000000000000000000000000000002911617815590505b5b50505050565b81548183558181151161192c5760008381526020902061192c918101908301611932565b5b505050565b610a2e91905b8082111561194c5760008155600101611938565b5090565b905600a165627a7a7230582057348ca0297970bb01202ce8022511ab041096fc938e17a211f6de719789f54e0029a165627a7a723058207f08e59b3da88e7db6ae63182ac584f5a56ccbe53f3a10d2ca155d5729ede5540029',
gas: '3900000',
gasPrice: eth.gasPrice.mul(1.1).floor()
}, function (e, contract){
console.log(e, contract);
if (typeof contract.address !== 'undefined') {
console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
}
});
var _tokenFactory = minimeFactory.address ;
var sgtAbi = [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"creationBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newController","type":"address"}],"name":"changeController","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_blockNumber","type":"uint256"}],"name":"balanceOfAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_cloneTokenName","type":"string"},{"name":"_cloneDecimalUnits","type":"uint8"},{"name":"_cloneTokenSymbol","type":"string"},{"name":"_snapshotBlock","type":"uint256"},{"name":"_transfersEnabled","type":"bool"}],"name":"createCloneToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"parentToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_amount","type":"uint256"}],"name":"generateTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_blockNumber","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"data","type":"uint256[]"}],"name":"multiMint","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"transfersEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"parentSnapShotBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_amount","type":"uint256"}],"name":"destroyTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenFactory","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_transfersEnabled","type":"bool"}],"name":"enableTransfers","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"_tokenFactory","type":"address"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_cloneToken","type":"address"},{"indexed":false,"name":"_snapshotBlock","type":"uint256"}],"name":"NewCloneToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Approval","type":"event"}];
var sgtContract = web3.eth.contract(sgtAbi);
var sgt = sgtContract.new(
_tokenFactory,
{
from: web3.eth.accounts[0],
data: '0x60a0604052600760608190527f4d4d545f302e310000000000000000000000000000000000000000000000000060809081526200004091600491906200018f565b5034156200004a57fe5b60405160208062001cdf83398101604052515b8060006000604060405190810160405280601481526020017f5374617475732047656e6573697320546f6b656e0000000000000000000000008152506001604060405190810160405280600381526020017f534754000000000000000000000000000000000000000000000000000000000081525060005b5b60008054600160a060020a03191633600160a060020a03161790555b600b805461010060a860020a031916610100600160a060020a038a16021790558351620001279060019060208701906200018f565b506002805460ff191660ff851617905581516200014c9060039060208501906200018f565b5060058054600160a060020a031916600160a060020a0388161790556006859055600b805460ff1916821515179055436007555b505050505050505b5062000239565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001d257805160ff191683800117855562000202565b8280016001018555821562000202579182015b8281111562000202578251825591602001919060010190620001e5565b5b506200021192915062000215565b5090565b6200023691905b808211156200021157600081556001016200021c565b5090565b90565b611a9680620002496000396000f3006060604052361561012d5763ffffffff60e060020a60003504166306fdde0381146101ec578063095ea7b31461027c57806317634514146102af57806318160ddd146102d157806323b872dd146102f3578063313ce5671461032c5780633cebb823146103525780634ee2cd7e1461037057806354fd4d50146103a15780636638c0871461043157806370a08231146104f157806380a540011461051f578063827f32c01461054b57806395d89b411461057e578063981b24d01461060e5780639a0e4ebb14610633578063a9059cbb14610688578063bef97c87146106bb578063c5bcc4f1146106df578063cae9ca5114610701578063d3ce77fe14610778578063dd62ed3e146107ab578063e77772fe146107df578063f41e60c51461080b578063f77c479114610822575b6101ea5b60005461014690600160a060020a031661084e565b156101e157600080546040805160209081019390935280517ff48c3054000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301529151919092169263f48c30549234926024808301939282900301818588803b15156101b857fe5b6125ee5a03f115156101c657fe5b505060405151151591506101dc90505760006000fd5b6101e7565b60006000fd5b5b565b005b34156101f457fe5b6101fc61087b565b604080516020808252835181830152835191928392908301918501908083838215610242575b80518252602083111561024257601f199092019160209182019101610222565b505050905090810190601f16801561026e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561028457fe5b61029b600160a060020a0360043516602435610908565b604080519115158252519081900360200190f35b34156102b757fe5b6102bf610a7a565b60408051918252519081900360200190f35b34156102d957fe5b6102bf610a80565b60408051918252519081900360200190f35b34156102fb57fe5b61029b600160a060020a0360043581169060243516604435610a91565b604080519115158252519081900360200190f35b341561033457fe5b61033c610b34565b6040805160ff9092168252519081900360200190f35b341561035a57fe5b6101ea600160a060020a0360043516610b3d565b005b341561037857fe5b6102bf600160a060020a0360043516602435610b86565b60408051918252519081900360200190f35b34156103a957fe5b6101fc610cd2565b604080516020808252835181830152835191928392908301918501908083838215610242575b80518252602083111561024257601f199092019160209182019101610222565b505050905090810190601f16801561026e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561043957fe5b6104d5600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375050604080516020601f818a01358b0180359182018390048302840183018552818452989a60ff8b35169a909994019750919550918201935091508190840183828082843750949650508435946020013515159350610d6092505050565b60408051600160a060020a039092168252519081900360200190f35b34156104f957fe5b6102bf600160a060020a0360043516610fc0565b60408051918252519081900360200190f35b341561052757fe5b6104d5610fd4565b60408051600160a060020a039092168252519081900360200190f35b341561055357fe5b61029b600160a060020a0360043516602435610fe3565b604080519115158252519081900360200190f35b341561058657fe5b6101fc6110bc565b604080516020808252835181830152835191928392908301918501908083838215610242575b80518252602083111561024257601f199092019160209182019101610222565b505050905090810190601f16801561026e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561061657fe5b6102bf60043561114a565b60408051918252519081900360200190f35b341561063b57fe5b6101ea60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061123c95505050505050565b005b341561069057fe5b61029b600160a060020a03600435166024356112f3565b604080519115158252519081900360200190f35b34156106c357fe5b61029b61131c565b604080519115158252519081900360200190f35b34156106e757fe5b6102bf611325565b60408051918252519081900360200190f35b341561070957fe5b604080516020600460443581810135601f810184900484028501840190955284845261029b948235600160a060020a031694602480359560649492939190920191819084018382808284375094965061132b95505050505050565b604080519115158252519081900360200190f35b341561078057fe5b61029b600160a060020a0360043516602435611450565b604080519115158252519081900360200190f35b34156107b357fe5b6102bf600160a060020a0360043581169060243516611525565b60408051918252519081900360200190f35b34156107e757fe5b6104d5611552565b60408051600160a060020a039092168252519081900360200190f35b341561081357fe5b6101ea6004351515611566565b005b341561082a57fe5b6104d5611595565b60408051600160a060020a039092168252519081900360200190f35b600080600160a060020a038316151561086a5760009150610875565b823b90506000811191505b50919050565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109005780601f106108d557610100808354040283529160200191610900565b820191906000526020600020905b8154815290600101906020018083116108e357829003601f168201915b505050505081565b600b5460009060ff16151561091d5760006000fd5b81158015906109505750600160a060020a0333811660009081526009602090815260408083209387168352929052205415155b1561095b5760006000fd5b60005461097090600160a060020a031661084e565b15610a12576000805460408051602090810184905281517fda682aeb000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301528881166024830152604482018890529251929093169363da682aeb9360648082019492918390030190829087803b15156109f057fe5b6102c65a03f115156109fe57fe5b50506040515115159050610a125760006000fd5b5b600160a060020a03338116600081815260096020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b92915050565b60075481565b6000610a8b4361114a565b90505b90565b6000805433600160a060020a03908116911614610b1f57600b5460ff161515610aba5760006000fd5b600160a060020a038085166000908152600960209081526040808320339094168352929052205482901015610af157506000610b2d565b600160a060020a03808516600090815260096020908152604080832033909416835292905220805483900390555b610b2a8484846115a4565b90505b9392505050565b60025460ff1681565b60005433600160a060020a03908116911614610b595760006000fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600160a060020a0382166000908152600860205260408120541580610be65750600160a060020a038316600090815260086020526040812080548492908110610bcb57fe5b906000526020600020900160005b50546001608060020a0316115b15610ca257600554600160a060020a031615610c9557600554600654600160a060020a0390911690634ee2cd7e908590610c2190869061178c565b6000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1515610c7857fe5b6102c65a03f11515610c8657fe5b5050604051519150610a749050565b506000610a74565b610a74565b600160a060020a0383166000908152600860205260409020610cc490836117a6565b9050610a74565b5b92915050565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109005780601f106108d557610100808354040283529160200191610900565b820191906000526020600020905b8154815290600101906020018083116108e357829003601f168201915b505050505081565b600080831515610d6e574393505b600b60019054906101000a9004600160a060020a0316600160a060020a0316635b7b72c130868a8a8a896000604051602001526040518763ffffffff1660e060020a0281526004018087600160a060020a0316600160a060020a03168152602001868152602001806020018560ff1660ff1681526020018060200184151515158152602001838103835287818151815260200191508051906020019080838360008314610e36575b805182526020831115610e3657601f199092019160209182019101610e16565b505050905090810190601f168015610e625780820380516001836020036101000a031916815260200191505b5083810382528551815285516020918201918701908083838215610ea1575b805182526020831115610ea157601f199092019160209182019101610e81565b505050905090810190601f168015610ecd5780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b1515610eee57fe5b6102c65a03f11515610efc57fe5b50506040805180517f3cebb823000000000000000000000000000000000000000000000000000000008252600160a060020a03338116600484015292519094509184169250633cebb82391602480830192600092919082900301818387803b1515610f6357fe5b6102c65a03f11515610f7157fe5b5050604080518681529051600160a060020a03841692507f086c875b377f900b07ce03575813022f05dd10ed7640b5282cf6d3c3fc352ade9181900360200190a28091505b5095945050505050565b6000610fcc8243610b86565b90505b919050565b600554600160a060020a031681565b600080548190819033600160a060020a039081169116146110045760006000fd5b61100f600a436117a6565b91508184830110156110215760006000fd5b61102e600a85840161191c565b61103785610fc0565b90508084820110156110495760006000fd5b600160a060020a038516600090815260086020526040902061106d9082860161191c565b604080518581529051600160a060020a038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3600192505b5b505092915050565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156109005780601f106108d557610100808354040283529160200191610900565b820191906000526020600020905b8154815290600101906020018083116108e357829003601f168201915b505050505081565b600a546000901580611183575081600a600081548110151561116857fe5b906000526020600020900160005b50546001608060020a0316115b1561122457600554600160a060020a03161561121757600554600654600160a060020a039091169063981b24d0906111bc90859061178c565b6000604051602001526040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b15156111fa57fe5b6102c65a03f1151561120857fe5b5050604051519150610fcf9050565b506000610fcf565b610fcf565b61122f600a836117a6565b9050610fcf565b5b919050565b600080548190819033600160a060020a0390811691161461125d5760006000fd5b600092505b83518310156112eb578351600160a060020a039085908590811061128257fe5b906020019060200201511691507401000000000000000000000000000000000000000084848151811015156112b357fe5b906020019060200201518115156112c657fe5b0490506112d38282610fe3565b15156112df5760006000fd5b5b600190920191611262565b5b5b50505050565b600b5460009060ff1615156113085760006000fd5b6113133384846115a4565b90505b92915050565b600b5460ff1681565b60065481565b60006113378484610908565b15156113435760006000fd5b83600160a060020a0316638f4ffcb1338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383600083146113e9575b8051825260208311156113e957601f1990920191602091820191016113c9565b505050905090810190601f1680156114155780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b151561143357fe5b6102c65a03f1151561144157fe5b505050600190505b9392505050565b600080548190819033600160a060020a039081169116146114715760006000fd5b61147c600a436117a6565b91508382101561148c5760006000fd5b611499600a85840361191c565b6114a285610fc0565b9050838110156114b25760006000fd5b600160a060020a03851660009081526008602052604090206114d69085830361191c565b604080518581529051600091600160a060020a038816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3600192505b5b505092915050565b600160a060020a038083166000908152600960209081526040808320938516835292905220545b92915050565b600b546101009004600160a060020a031681565b60005433600160a060020a039081169116146115825760006000fd5b600b805460ff19168215151790555b5b50565b600054600160a060020a031681565b600080808315156115b85760019250611783565b6006544390106115c85760006000fd5b600160a060020a03851615806115ef575030600160a060020a031685600160a060020a0316145b156115fa5760006000fd5b6116048643610b86565b9150838210156116175760009250611783565b60005461162c90600160a060020a031661084e565b156116ce576000805460408051602090810184905281517f4a393149000000000000000000000000000000000000000000000000000000008152600160a060020a038b811660048301528a81166024830152604482018a905292519290931693634a3931499360648082019492918390030190829087803b15156116ac57fe5b6102c65a03f115156116ba57fe5b505060405151151590506116ce5760006000fd5b5b600160a060020a03861660009081526008602052604090206116f39085840361191c565b6116fd8543610b86565b905080848201101561170f5760006000fd5b600160a060020a03851660009081526008602052604090206117339082860161191c565b84600160a060020a031686600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3600192505b50509392505050565b600081831061179b5781611313565b825b90505b92915050565b60006000600060008580549050600014156117c45760009350611913565b8554869060001981019081106117d657fe5b906000526020600020900160005b50546001608060020a0316851061183b5785548690600019810190811061180757fe5b906000526020600020900160005b505470010000000000000000000000000000000090046001608060020a03169350611913565b85600081548110151561184a57fe5b906000526020600020900160005b50546001608060020a03168510156118735760009350611913565b8554600093506000190191505b828211156118d55760026001838501015b0490508486828154811015156118a357fe5b906000526020600020900160005b50546001608060020a0316116118c9578092506118d0565b6001810391505b611880565b85838154811015156118e357fe5b906000526020600020900160005b505470010000000000000000000000000000000090046001608060020a031693505b50505092915050565b8154600090819015806119595750835443908590600019810190811061193e57fe5b906000526020600020900160005b50546001608060020a0316105b156119cf578354849061196f8260018301611a1f565b8154811061197957fe5b906000526020600020900160005b5080546001608060020a03858116700100000000000000000000000000000000024382166fffffffffffffffffffffffffffffffff19909316929092171617815591506112eb565b8354849060001981019081106119e157fe5b906000526020600020900160005b5080546001608060020a0380861670010000000000000000000000000000000002911617815590505b5b50505050565b815481835581811511611a4357600083815260209020611a43918101908301611a49565b5b505050565b610a8e91905b80821115611a635760008155600101611a4f565b5090565b905600a165627a7a7230582089f20df28756d7605d82438014b8d7a74992c4df8692e8aec73af24dbc1fffa80029',
gas: '3900000',
gasPrice: eth.gasPrice.mul(1.1).floor()
}, function (e, contract){
console.log(e, contract);
if (typeof contract.address !== 'undefined') {
console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
}
});
////////
var minimeFactoryAbi = [{"constant":false,"inputs":[{"name":"_parentToken","type":"address"},{"name":"_snapshotBlock","type":"uint256"},{"name":"_tokenName","type":"string"},{"name":"_decimalUnits","type":"uint8"},{"name":"_tokenSymbol","type":"string"},{"name":"_transfersEnabled","type":"bool"}],"name":"createCloneToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"}];
var minimeFactory = eth.contract(minimeFactoryAbi).at("0x94bda9e40d82a09b8965e2082e5d286593246927");
var sgtAbi = [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"creationBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newController","type":"address"}],"name":"changeController","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_blockNumber","type":"uint256"}],"name":"balanceOfAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_cloneTokenName","type":"string"},{"name":"_cloneDecimalUnits","type":"uint8"},{"name":"_cloneTokenSymbol","type":"string"},{"name":"_snapshotBlock","type":"uint256"},{"name":"_transfersEnabled","type":"bool"}],"name":"createCloneToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"parentToken","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_amount","type":"uint256"}],"name":"generateTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_blockNumber","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"data","type":"uint256[]"}],"name":"multiMint","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"transfersEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"parentSnapShotBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_amount","type":"uint256"}],"name":"destroyTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenFactory","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_transfersEnabled","type":"bool"}],"name":"enableTransfers","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"controller","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"_tokenFactory","type":"address"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_cloneToken","type":"address"},{"indexed":false,"name":"_snapshotBlock","type":"uint256"}],"name":"NewCloneToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Approval","type":"event"}];
var sgt = eth.contract(sgtAbi).at("0x4bdA828F1fE628973c39366263B78B7cd9d6D8fe")