Browse Source

Fix first part of stdserv.js. Still much to do.

cl-refactor
Gav Wood 10 years ago
parent
commit
c0b3f93e8e
  1. 24
      stdserv.js

24
stdserv.js

@ -1,7 +1,9 @@
eth = web3.eth; eth = web3.eth;
env = web3.env;
env.note('Creating Config...') env.note('Creating Config...')
var configCode = eth.lll(" var config;
eth.lll("
{ {
[[69]] (caller) [[69]] (caller)
(returnlll { (returnlll {
@ -12,13 +14,19 @@ var configCode = eth.lll("
) )
(return @@ $0) (return @@ $0)
}) })
} }"
") ).then(function(configCode)
env.note('Config code: ' + configCode) {
var config; console.log('Config code: ' + configCode);
eth.transact({ 'code': configCode }, function(a) { config = a; }); return eth.transact({ 'code': configCode });
}).then(function(configAddress)
{
config = configAddress;
console.log('Config at address ' + configAddress);
});
env.note('Config at address ' + config) // marek: TODO
/*
var nameRegCode = eth.lll(" var nameRegCode = eth.lll("
{ {
@ -306,7 +314,7 @@ eth.transact({ 'to': exchange, 'data': [web3.fromAscii('new'), gavCoin, '5000',
env.note('Register gav.eth...') env.note('Register gav.eth...')
eth.transact({ 'to': dnsReg, 'data': [web3.fromAscii('register'), web3.fromAscii('gav'), web3.fromAscii('opensecrecy.com')] }); eth.transact({ 'to': dnsReg, 'data': [web3.fromAscii('register'), web3.fromAscii('gav'), web3.fromAscii('opensecrecy.com')] });
*/
env.note('All done.') env.note('All done.')
// env.load('/home/gav/Eth/cpp-ethereum/stdserv.js') // env.load('/home/gav/Eth/cpp-ethereum/stdserv.js')

Loading…
Cancel
Save