Commit b53895e8 authored by yann300's avatar yann300

add contract name to the resolve transaction object

parent 4e43f499
......@@ -186,6 +186,7 @@ class TxListener {
for (var fn in compiledContracts[contractName].functionHashes) {
if (compiledContracts[contractName].functionHashes[fn] === inputData.substring(0, 8)) {
this._resolvedTransactions[tx.hash] = {
contractName: contractName,
to: tx.to,
fn: fn,
params: this._decodeInputParams(inputData.substring(8), getFunction(abi, fn))
......@@ -195,6 +196,7 @@ class TxListener {
}
// fallback function
this._resolvedTransactions[tx.hash] = {
contractName: contractName,
to: tx.to,
fn: '(fallback)',
params: null
......@@ -206,6 +208,7 @@ class TxListener {
params = this._decodeInputParams(inputData.substring(bytecode.length), getConstructorInterface(abi))
}
this._resolvedTransactions[tx.hash] = {
contractName: contractName,
to: null,
fn: '(constructor)',
params: params
......
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