Ethereum 使用web3.js发送signTransaction。但我可以';我无法在ganache中确认此交易

Ethereum 使用web3.js发送signTransaction。但我可以';我无法在ganache中确认此交易,ethereum,solidity,truffle,web3js,ganache,Ethereum,Solidity,Truffle,Web3js,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'

我想将数据放入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(这些事务基于智能合约部署):


js文件中没有任何代码可以发送任何事务。您所做的只是用私钥签署了一个事务。您可以使用发送它。

在您的js文件中没有任何代码可以发送事务。您所做的只是用私钥签署了一个事务。您可以使用发送它