Commit b53895e8 authored by yann300's avatar yann300

add contract name to the resolve transaction object

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