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

web3.eth.accounts.signTransaction returning invalid #4292

Closed
jdevcs opened this issue Sep 6, 2021 · 1 comment · Fixed by #4295
Closed

web3.eth.accounts.signTransaction returning invalid #4292

jdevcs opened this issue Sep 6, 2021 · 1 comment · Fixed by #4295
Assignees
Labels
1.x 1.0 related issues Bug Addressing a bug P2 Medium severity bugs

Comments

@jdevcs
Copy link
Contributor

jdevcs commented Sep 6, 2021

Expected behavior

Should return correct v,r,s for web3.eth.accounts.signTransaction

Actual behavior

Always returning v: '0x00', r: '0x00000000000000000000', s: '0x00000000000000000000',

Steps to reproduce the behavior

    const web3 = new Web3( 
        "https://mainnet.infura.io/v3/ID_OF_PROJ"
        );

    let data = await web3.eth.accounts.signTransaction({
        to: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',
        value: '1000',
        gas: 21000,
    }, '0x0000000PRIVATEKEY');

    console.log(data)

Logs

{ messageHash: '0x4bec55a14404b60aaf666effe60e67879d50072fd3a1312a76d5e9eeb7686d56', v: '0x00', r: '0x00000000000000000000', s: '0x00000000000000000000', rawTransaction: '0xf866808512bd61afdc82520894f0109fc8df283027b6285cc889f5aa624eac1f558203e88026a0a9fb8610d63edc53f11f8840f8b213ff677ffa22f3757c450ed48966e7699f0da06c39e77f71d7f969e899b4bb511931b461e635fde556394b1837ce946e99909f', transactionHash: '0xe8c2ffa6043bd43e096030ee4615c56514caf4e5debab5999ef62c168fdd0d20' }

Environment

"web3": "^1.5.2"

@jdevcs jdevcs added 1.x 1.0 related issues Bug Addressing a bug P2 Medium severity bugs labels Sep 6, 2021
@jdevcs jdevcs linked a pull request Sep 8, 2021 that will close this issue
16 tasks
@jdevcs
Copy link
Contributor Author

jdevcs commented Sep 8, 2021

v,r,s are encoded correctly in rawTransaction but not in outer obj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Bug Addressing a bug P2 Medium severity bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant