From Calldata

Facet Transactions in Ethereum L1 Tx Calldata

To create a Facet transaction as an EOA, you send a successful (receipt status = 1) Ethereum transaction to the Facet inbox address, an EOA account on Ethereum L1 with no known private key:

0x00000000000000000000000000000000000face7

We refer to these L1 transactions as envelopes, as they carry an RLP-encoded Facet transaction as a "payload" within their calldata. The signer of an Ethereum envelope transaction determines the "from" on a Facet transaction.

Here's how you might do this using Viem:

const transactionData = [
  toHex(l2ChainId),
  to ?? "0x",
  value ? toHex(value) : "0x",
  gasLimit ? toHex(gasLimit) : "0x",
  data ?? "0x",
  mineBoost ?? "0x"
];

const encodedTransaction = concatHex([toHex(70), toRlp(transactionData)]);

const l1Transaction = {
  account: l1WalletClient.account,
  to: "0x00000000000000000000000000000000000face7",
  value: 0n,
  data: encodedTransaction,
  chain: l1WalletClient.chain,
};

await l1WalletClient.sendTransaction(l1Transaction);

Last updated