import { Address, Transaction } from '@tevm/voltaire';
const tx: Transaction.EIP1559 = {
type: Transaction.Type.EIP1559,
chainId: 1n,
nonce: 0n,
maxPriorityFeePerGas: 1_500_000_000n,
maxFeePerGas: 30_000_000_000n,
gasLimit: 21_000n,
to: Address('0x742d35cc6634c0532925a3b844bc9e7595f0beb0'),
value: 1_000_000_000_000_000_000n,
data: new Uint8Array(),
accessList: [],
yParity: 0,
r: new Uint8Array(32),
s: new Uint8Array(32),
};
const raw = Transaction.serialize(tx);
const decoded = Transaction.deserialize(raw);
const signingHash = Transaction.getSigningHash(tx);
const effectivePrice = Transaction.getGasPrice(tx, 15_000_000_000n);