使用 web3.js 发送 signTransaction。但我无法在 ganache 中确认这笔交易

sending signTransaction with web3.js. but I can't confirm this transaction in ganache

我想把数据放在rawTransaction中,发送给ganache本地节点的智能触点。 顺便说一句,我用数据做的原始交易是创建的,但是我在ganache上看不到交易。你为什么这么做?

const Web3 = require('web3');
let web3 = new Web3(new Web3.providers.HttpProvider('http://127.0.0.1:7545/'));
const Accounts = require('web3-eth-accounts');

let user_addr = "dummy addr"
let user_cash = "dummy cash"
let userInfo = [user_addr, user_cash];
let payment_user = web3.utils.toHex(userInfo);
console.log(payment_user);


web3.eth.accounts.signTransaction({
    from: "0xa22b061113adf71a54E9a12F7480256D8C342d8F",
    to: '0xEf938B9eCC089D47BAA7B4582Cdb69C526bfD827',
    value: '10000',
    gas: 200000,
    data: payment_user
}, '052607c87473b31777d0f208021da7b68949f0b02b09bcecb0248198dbed765d');

结果:

 messageHash: '0x4a2dbabb5a7a8e16102fef48f5f1e2154c266c14c3095033d5b3c496bc179e13',
  v: '0x0a95',
  r: '0xc01ea799c002a1eac82bd0aa1856ae5f86f6a74c6985ac74695fedcf55a755c3',
  s: '0x200fdb3e4f6013e9dcc9ed47ae28e0b95a7837498c9e173734312b616629a827',
  rawTransaction: '0xf884158504a817c80083030d4094ef938b9ecc089d47baa7b4582cdb69c526bfd8278227109b5b2264756d6d792061646472222c2264756d6d792063617368225d820a95a0c01ea799c002a1eac82bd0aa1856ae5f86f6a74c6985ac74695fedcf55a755c3a0200fdb3e4f6013e9dcc9ed47ae28e0b95a7837498c9e173734312b616629a827',
  transactionHash: '0xa71361fed8d1cb69cc67e801aa118a151ec50bcf3f1b95053af7258265e151c5'

ganache(这些交易基于智能合约部署):

enter image description here

您的 js 文件中没有发送任何交易的代码。你所做的只是用私钥签署了一笔交易。您可以使用web3.eth.sendSignedTransaction发送。