Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect legacy transaction from value #3899

Closed
belopash opened this issue Mar 14, 2023 · 5 comments
Closed

incorrect legacy transaction from value #3899

belopash opened this issue Mar 14, 2023 · 5 comments
Assignees
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6

Comments

@belopash
Copy link

belopash commented Mar 14, 2023

Ethers Version

6.1.0

Search Terms

No response

Describe the Problem

The value of property from for the legacy transaction has incorrect value.
Expected 0xbb9Bf3b2207c51273959DC571e4E1f01fb3A0B8D, but got 0x1349a095F2A49967e7f7A9AA5654cE56Ccd942Df.
Worked in v5.7.0

Code Snippet

// 6.1.0
const tx = ethers.Transaction.from({
        to: '0x08716e418e68564c96b68192e985762740728018',
        nonce: 603,
        gasLimit: 489365n,
        gasPrice: 1000000000n,
        value: 0n,
        data: '0x7a93696a0000000000000000000000000000000000000000000000000000000000000000',
        type: 0,
        signature: {
            r: '0x934e9b41ca05ce6581f4ef6f3f1026b7d190e0e4d0ff63c9b91865beeeb52768',
            s: '0x32314ac16b0234e643a46de09e39e62e32568b9dcbbd677fbff1e22ed649fa70',
            v: 2606n
        },
    })
tx.from // "0x1349a095F2A49967e7f7A9AA5654cE56Ccd942Df"

// 5.7.0
const serializedTransaction = serialize(
        {
            to: '0x08716e418e68564c96b68192e985762740728018',
            nonce: 603,
            gasLimit: 489365n,
            gasPrice: 1000000000n,
            value: 0n,
            data: '0x7a93696a0000000000000000000000000000000000000000000000000000000000000000',
            type: 0,
        },
        {
            r: '0x934e9b41ca05ce6581f4ef6f3f1026b7d190e0e4d0ff63c9b91865beeeb52768',
            s: '0x32314ac16b0234e643a46de09e39e62e32568b9dcbbd677fbff1e22ed649fa70',
            v: 2606
        }
    )
const tx = parse(serializedTransaction)
tx.from // "0xbb9Bf3b2207c51273959DC571e4E1f01fb3A0B8D"

Contract ABI

No response

Errors

No response

Environment

node.js (v12 or newer)

Environment (Other)

No response

@belopash belopash added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Mar 14, 2023
@belopash belopash changed the title incorrect lagacy transaction from value incorrect legacy transaction from value Mar 14, 2023
@ricmoo ricmoo added the on-deck This Enhancement or Bug is currently being worked on. label Mar 14, 2023
@ricmoo
Copy link
Member

ricmoo commented Mar 14, 2023

Thanks. I’ll look into this asap with the other tx bug.

@belopash
Copy link
Author

Hey, any updates on this?

@ricmoo
Copy link
Member

ricmoo commented Mar 19, 2023

Yes, it’s fixed locally and I’m running my final tests on v6.2 because there were some bigger changes to how the Contract meta-class populates it’s callable Proxy entry points and I want to make sure it is completely backwards compatible.

I expect it to be out within a few hours. :)

@ricmoo ricmoo added bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. and removed investigate Under investigation and may be a bug. on-deck This Enhancement or Bug is currently being worked on. labels Mar 20, 2023
@ricmoo
Copy link
Member

ricmoo commented Mar 20, 2023

This has been fixed in v6.2.0. Try it out and let me know.

@belopash
Copy link
Author

Yes, works now, thanks! Great job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants