1

I need ethereumjs-tx in PHP. Seems there is no PHP library so far. I found only JS and Python Library. Is it possible to serialize transaction data on geth? If not, I will use nodejs or create the PHP library. Before that, I want to ask this question.

What I need:

$rawTx = [
  'nonce' => '0x17',
  'gasPrice' => '0x4a817c800',
  'gasLimit' => '0x5209',
  'to' => '0x5dbb9793537515398a1176d365b636a5321d9e39',
  'value' => '0xde0b6b3a7640000',
  'data' => '',
  'chainId' => 3
];

$tx = new Tx($rawTx);
$serializedTx = $tx->serialize(); // or access geth function if it possible

ethereumjs-tx

Create and sign OFFLINE raw transactions?

2
  • any luck for your problem? If yes please share I am also looking same solution Nov 7 '17 at 5:22
  • Data serialization should be easy with ethereum-php. I would love to add this feature but it's not in hight priority yet. Ping me if you want to help to implement "serialize()" and by adding tests. Jun 14 '18 at 10:35
1

If someone is looking for a solution, there is this implementation available:

https://github.com/web3p/ethereum-tx

0

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.