more rpc fixes

This commit is contained in:
Christopher Franko 2016-05-18 21:34:19 -04:00
parent 33905f8b91
commit 41d77c8622
3 changed files with 9 additions and 10 deletions

View file

@ -22,7 +22,6 @@ var Modules = map[string]string{
"admin": Admin_JS, "admin": Admin_JS,
"personal": Personal_JS, "personal": Personal_JS,
"exp": Eth_JS, "exp": Eth_JS,
"eth": Eth_JS,
"miner": Miner_JS, "miner": Miner_JS,
"debug": Debug_JS, "debug": Debug_JS,
"net": Net_JS, "net": Net_JS,
@ -198,31 +197,31 @@ web3._extend({
[ [
new web3._extend.Method({ new web3._extend.Method({
name: 'sign', name: 'sign',
call: 'eth_sign', call: 'exp_sign',
params: 2, params: 2,
inputFormatter: [web3._extend.formatters.inputAddressFormatter, null] inputFormatter: [web3._extend.formatters.inputAddressFormatter, null]
}), }),
new web3._extend.Method({ new web3._extend.Method({
name: 'resend', name: 'resend',
call: 'eth_resend', call: 'exp_resend',
params: 3, params: 3,
inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal] inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal]
}), }),
new web3._extend.Method({ new web3._extend.Method({
name: 'getNatSpec', name: 'getNatSpec',
call: 'eth_getNatSpec', call: 'exp_getNatSpec',
params: 1, params: 1,
inputFormatter: [web3._extend.formatters.inputTransactionFormatter] inputFormatter: [web3._extend.formatters.inputTransactionFormatter]
}), }),
new web3._extend.Method({ new web3._extend.Method({
name: 'signTransaction', name: 'signTransaction',
call: 'eth_signTransaction', call: 'exp_signTransaction',
params: 1, params: 1,
inputFormatter: [web3._extend.formatters.inputTransactionFormatter] inputFormatter: [web3._extend.formatters.inputTransactionFormatter]
}), }),
new web3._extend.Method({ new web3._extend.Method({
name: 'submitTransaction', name: 'submitTransaction',
call: 'eth_submitTransaction', call: 'exp_submitTransaction',
params: 1, params: 1,
inputFormatter: [web3._extend.formatters.inputTransactionFormatter] inputFormatter: [web3._extend.formatters.inputTransactionFormatter]
}) })
@ -231,7 +230,7 @@ web3._extend({
[ [
new web3._extend.Property({ new web3._extend.Property({
name: 'pendingTransactions', name: 'pendingTransactions',
getter: 'eth_pendingTransactions', getter: 'exp_pendingTransactions',
outputFormatter: function(txs) { outputFormatter: function(txs) {
var formatted = []; var formatted = [];
for (var i = 0; i < txs.length; i++) { for (var i = 0; i < txs.length; i++) {

View file

@ -2857,7 +2857,7 @@ var addFunctionsToContract = function (contract) {
contract.abi.filter(function (json) { contract.abi.filter(function (json) {
return json.type === 'function'; return json.type === 'function';
}).map(function (json) { }).map(function (json) {
return new SolidityFunction(contract._eth, json, contract.address); return new SolidityFunction(contract._exp, json, contract.address);
}).forEach(function (f) { }).forEach(function (f) {
f.attachToContract(contract); f.attachToContract(contract);
}); });

View file

@ -34,8 +34,8 @@ const (
notificationBufferSize = 10000 // max buffered notifications before codec is closed notificationBufferSize = 10000 // max buffered notifications before codec is closed
DefaultIPCApis = "admin,eth,debug,miner,net,shh,txpool,personal,web3" DefaultIPCApis = "admin,exp,debug,miner,net,shh,txpool,personal,web3"
DefaultHTTPApis = "eth,net,web3" DefaultHTTPApis = "exp,net,web3"
) )
// CodecOption specifies which type of messages this codec supports // CodecOption specifies which type of messages this codec supports