i use this code :

const EthereumTx = require('ethereumjs-tx').Transaction
const privateKey = Buffer.from(

const txParams = {
    nonce: 686,
    gasPrice: 171616800000,
    gasLimit: 21000,
    to: '0x9E0DE269B27641fAaAB8D5281731c1eaa4bd3176',
    value: 313387200000000,
    data: '0x0',

// The second parameter is not necessary if these values are used
const tx = new EthereumTx(txParams, {
    chain: 'mainnet',
    hardfork: 'petersburg'
const serializedTx = tx.serialize()

but it not same as my transaction : https://etherscan.io/tx/0x74563feb8006066e0a2047eb354ca6b378cc811e9c9513245c347728adb38c88

what is my mistake?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.