aboutsummaryrefslogtreecommitdiffstats
path: root/lib/contract.js
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-28 21:20:36 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-28 21:20:36 +0800
commitea7c2fc673db31f96583e4712aa0fb78f5d709eb (patch)
tree120cf378eec0bc7549fe8128d62766964cb0cf6b /lib/contract.js
parent63d9c070ef7637a3d570a5a45ea931c1680ebc02 (diff)
downloadgo-tangerine-ea7c2fc673db31f96583e4712aa0fb78f5d709eb.tar
go-tangerine-ea7c2fc673db31f96583e4712aa0fb78f5d709eb.tar.gz
go-tangerine-ea7c2fc673db31f96583e4712aa0fb78f5d709eb.tar.bz2
go-tangerine-ea7c2fc673db31f96583e4712aa0fb78f5d709eb.tar.lz
go-tangerine-ea7c2fc673db31f96583e4712aa0fb78f5d709eb.tar.xz
go-tangerine-ea7c2fc673db31f96583e4712aa0fb78f5d709eb.tar.zst
go-tangerine-ea7c2fc673db31f96583e4712aa0fb78f5d709eb.zip
abi function type
Diffstat (limited to 'lib/contract.js')
-rw-r--r--lib/contract.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/contract.js b/lib/contract.js
index e71734d0b..65a061502 100644
--- a/lib/contract.js
+++ b/lib/contract.js
@@ -51,6 +51,7 @@ 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?
if (method.name.indexOf('(') === -1) {
var displayName = method.name;
var typeName = method.inputs.map(function(i){return i.type; }).join();
@@ -84,7 +85,7 @@ var contract = function (address, desc) {
});
- desc.forEach(function (method) {
+ abi.filterFunctions(desc).forEach(function (method) {
var displayName = abi.methodDisplayName(method.name);
var typeName = abi.methodTypeName(method.name);