Unverified Commit a7f028cf authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #943 from ethereum/yann300-patch-23

Add serializeInputs function helper
parents 63b7bab4 29676c2a
...@@ -76,6 +76,15 @@ module.exports = { ...@@ -76,6 +76,15 @@ module.exports = {
return funABI return funABI
}, },
serializeInputs: function (fnAbi) {
var serialized = '('
if (fnAbi.inputs && fnAbi.inputs.length) {
serialized += fnAbi.inputs.map((input) => { return input.type }).join(',')
}
serialized += ')'
return serialized
},
getFunction: function (abi, fnName) { getFunction: function (abi, fnName) {
for (var i = 0; i < abi.length; i++) { for (var i = 0; i < abi.length; i++) {
var fn = abi[i] var fn = abi[i]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment