Skip to content

Instantly share code, notes, and snippets.

@cupOJoseph
Last active April 13, 2025 03:49
Show Gist options
  • Save cupOJoseph/613de42121274c2bb7880b41169658d9 to your computer and use it in GitHub Desktop.
Save cupOJoseph/613de42121274c2bb7880b41169658d9 to your computer and use it in GitHub Desktop.
Ethereum cross-chain agnostic transaction types

Standard transaction:

{
  from: "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8",
  to: "0xac03bb73b6a9e108530aff4df5077c2b3d481e5a",
  gasLimit: "21000",
  maxFeePerGas: "300",
  maxPriorityFeePerGas: "10",
  nonce: "0",
  value: "10000000000"
}

New Transaction Type X

{
  from: "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8",
  to: [
    {chain-id: 42161 //(arbitrum)
    to: 0xaf88d065e77c8cc2239327c5edb3a432268e5831},
    {chain-id: 8453 //(base)
    to: 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913}
  ],
  //every bytes index corresponds with an index for the "to" field, which directs to different chains.
  bytes: [0xabc, 0x123] 
  gasLimit: "21000",
  maxFeePerGas: "300",
  maxPriorityFeePerGas: "10",
  nonce: "0",
  value: "10000000000"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment