Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

web3.eth.accounts.signTransaction produced errant bytecode #1074

Closed
cmditch opened this issue Sep 23, 2017 · 4 comments
Closed

web3.eth.accounts.signTransaction produced errant bytecode #1074

cmditch opened this issue Sep 23, 2017 · 4 comments
Assignees
Labels
Bug Addressing a bug In Progress Currently being worked on

Comments

@cmditch
Copy link
Contributor

cmditch commented Sep 23, 2017

Bytecode produced with a period in it.

Should be able to replicate it with the code params below:

signTxParams = { 
    data: "0x23123123123123123",
    gas: 42424242424242,
    gasPrice: 42424242,
    nonce: 1,
    to: "0xd8b0990c007ba1ad97b37c001d1f87044312162a",
    value: "42424242",
    chainId: 1
}
privateKey = "0xef1ae7c6a04a3191b364c603f6f506938c98ec259597007300b42242f9fcc4b1"
signedTx = web3.eth.accounts.signTransaction(signTxParams, privateKey)

console.log(signedTx.rawTransaction);

> "0xf86b.80184028757b2862695a9e649b294d8b0990c007ba1ad97b37c001d1f87044312162a84028757b225a0254b9251405d5b83d688d0db794ef069fbb87a24d"

Browser : confirmed on Chrome & Safari
Web3.js Version : 1.0.0-beta.18

Note: To be fair, I don't think the above data field is totally valid bytecode. Nonetheless, thought this errant period might still be noteworthy.

@frozeman
Copy link
Contributor

@MaiaVictor can you have a look?

@frozeman frozeman added the Bug Addressing a bug label Sep 25, 2017
@netpi
Copy link

netpi commented Oct 26, 2017

I have the same problem !

@girish-bluefin
Copy link

its new api not implemented yet. You can see it
https://web3js.readthedocs.io/en/1.0/web3-eth.html#id73

@greg-flexidao
Copy link

greg-flexidao commented Nov 14, 2017

I have exactly the same problem.
With some normal transaction data and:

data:"0x2ca5a332000000000000000000000000000000000000000000000000000000000000753000000000000000000000000000000000000000000000000000000000000003e8"

My signed rowTransaction looks like this:
"0xf9ab.8038417bd2c89832dc6c094279915231c108f8f371ef75aa58e18d181bf863380b8442ca5a332000000000000000000000000000000000000000000000000000000000000753000000000000000000000000000000000000000000000000000000000000003e881.817aa086b303cdcb77810d5419c31fedd0ba7fc3f07e26de8b90af2cf96e4a54d37938a0366ab73e00884eb024174b1daf8dac605b3537d9ac0fa49d1073c93af38d51d4"

Now we have two periods..

Environment: NodeJS v8.9.1
Web3.js Version: 1.0.0-beta.26

not really sure what @girish-bluefin meant...

@nivida nivida self-assigned this Aug 9, 2018
@nivida nivida added the In Progress Currently being worked on label Aug 20, 2018
@nivida nivida mentioned this issue Mar 26, 2019
12 tasks
@nivida nivida closed this as completed Mar 27, 2019
@nivida nivida mentioned this issue Mar 28, 2019
12 tasks
@nivida nivida mentioned this issue Oct 21, 2019
11 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Addressing a bug In Progress Currently being worked on
Projects
None yet
Development

No branches or pull requests

6 participants