Ethereum transaction library in PHP.
Ethereum transaction library in PHP.
composer require web3p/ethereum-tx…use Web3p\EthereumTx\EIP1559Transaction;
// generate transaction instance with transaction parameters
$transaction = new EIP1559Transaction([
'nonce' => '0x01',
'from' => '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
'to' => '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
'maxPriorityFeePerGas' => '0x9184e72a000',
'maxFeePerGas' => '0x9184e72a000',
'gas' => '0x76c0',
'value' => '0x9184e72a',
'chainId' => 1, // required
'accessList' => [],
'data' => ''
]);use Web3p\EthereumTx\EIP2930Transaction;
// generate transaction instance with transaction parameters
$transaction = new EIP2930Transaction([
'nonce' => '0x01',
'from' => '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
'to' => '0xd46e8dd67c5d32be8058bb8eb970870f07244567',
'gas' => '0x76c0',
'value' => '0x9184e72a',
'chainId' => 1, // required
'accessList' => [],
'data' => ''
]);use Web3p\EthereumTx\Transaction;
$signedTransaction = $transaction->sign('your private key');https://www.web3p.xyz/ethereumtx.html
MIT
No open issues yet, or sync has not completed.