aboutsummaryrefslogtreecommitdiffstats
path: root/lib/contract.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/contract.js')
-rw-r--r--lib/contract.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/contract.js b/lib/contract.js
index 13c48ca10..0bf3ee471 100644
--- a/lib/contract.js
+++ b/lib/contract.js
@@ -178,11 +178,11 @@ var addEventsToContract = function (contract, desc, address) {
var contract = function (address, desc) {
+ // workaround for invalid assumption that method.name is the full anonymous prototype of the method.
+ // it's not. it's just the name. the rest of the code assumes it's actually the anonymous
+ // prototype, so we make it so as a workaround.
+ // TODO: we may not want to modify input params, maybe use copy instead?
desc.forEach(function (method) {
- // workaround for invalid assumption that method.name is the full anonymous prototype of the method.
- // it's not. it's just the name. the rest of the code assumes it's actually the anonymous
- // prototype, so we make it so as a workaround.
- // TODO: we may not want to modify input params, maybe use copy instead?
if (method.name.indexOf('(') === -1) {
var displayName = method.name;
var typeName = method.inputs.map(function(i){return i.type; }).join();
@@ -190,8 +190,6 @@ var contract = function (address, desc) {
}
});
-
-
var result = {};
addFunctionRelatedPropertiesToContract(result);
addFunctionsToContract(result, desc, address);