question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TransactionResponse contains different sender/receiver to the TransactionDescription

See original GitHub issue

Describe the bug

I instantiated a contract object called getTransaction which returns a TransactionResponse object that contains a data key and a to field. The docs say that TransactionResponse inherits from Transaction which has a to field that’s the receiver of a transaction.

The confusion for me is when I decode the data key of the TransactionResponse I get a TransactionDescription object that also contains a to field. But the to field from the TransactionResponse does not match the to field from the TransactionDescription match and I’ve been trying to understand why.

Reproduction steps

const url = 'cannot-include-for-security-reasons-replace-with-quiknode'
const ethers = require("ethers");
const utils = ethers.utils

const init = function() {
    const provider = new ethers.providers.WebSocketProvider(url);
    provider.on('pending', (tx) => {
        provider.getTransaction(tx).then(function(transaction) {
            const decodedInput = inter.parseTransaction({
                data: transaction.data,
                value: transaction.value
            });

            const transactionResponseReceiver = transaction.to;
            const transactionDescriptionReceiver = decodedInput.args.to

            console.log(transactionResponseReceiver)
            console.log(transactionDescriptionReceiver)

            console.log(transactionResponseReceiver === transactionDescriptionReceiver)
        });
    });
}

init();

Environment: Node: v14.15.4 Mac: Big Sur version 11.2.3 (20D91)

Search Terms TransactionDescription receiver and TransactionResponse

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fomotradercommented, Apr 26, 2021

Will certainly do and again thank you for maintaining this library and being so kind as to help out a lost beginner

1reaction
ricmoocommented, Apr 28, 2021

There is only 1 to for a transaction. But a Contract can be anything. So it sounds like the contract you are interacting with has a to (completely unrelated to the transaction) as a parameter to a function call. I won’t know more without more data.

But these questions also make more sense as a discussion. The issues are more for bugs and feature requests. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

TransactionResponse contains different sender/receiver to the ...
I instantiated a contract object called getTransaction which returns a TransactionResponse object that contains a data key and a to field. The docs...
Read more >
US9571373B2 - System and method for combining server side and ...
The system uses correlation data which is transferred over a computer network to identify corresponding sender/receiver parts of a distributed transaction.
Read more >
Gentran:Structure for zSeries User's Guide - FTP Directory Listing
THE GENTRAN:STRUCTURE AND GENTRAN:BASIC FOR ZSERIES SOFTWARE. (“STERLING COMMERCE SOFTWARE”) IS THE CONFIDENTIAL AND TRADE SECRET.
Read more >
WebSuite Cash Management Connectivity Guide Web Suite Mgt
WebSuite users and system administrators as well as other interest parties should have a general knowledge of the following: • Basic cash ...
Read more >
RFP Boiler Plate - Office of Group Benefits
administrators; and other health insurance communications to OGB 's plan ... Refer to Exhibit 4 for 997 transaction description and layout.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found