Skip to Content
neatdocs
Reference

neat3-sdk/frame

createFrameSubmitter and buildFrames. Send approve and swap as one atomic EIP-8141 transaction.

import { createFrameSubmitter, buildFrames } from "neat3-sdk/frame";

Requires the optional peer @forshtat/hegota-support@0.0.1. It targets the self-hosted devnet (profile ethrex-eip8141-tracer).

createFrameSubmitter

createFrameSubmitter(options): FrameSubmitter
OptionDefaultNotes
privateKeyrequiredDevnet-only key. It signs the transaction and pays the gas (self-relay)
rpcUrlhttps://eip8141-rpc.arnabbhowmik.in/rpcSends with eth_sendFrameTransaction
chainId1337
maxFeePerGas2 gwei
waittrueWait for inclusion and throw if any frame failed
timeoutMs120000How long to wait for inclusion

The returned function takes Call[], reads the sender's nonce, signs and sends the transaction, and resolves to its hash.

With wait on, it polls the receipt every two seconds. It throws if the transaction wasn't mined in time, or if it was mined but a frame didn't succeed. A frame with status 0x2 was skipped because an earlier frame in its atomic batch failed.

buildFrames

buildFrames(calls: Call[]): Frame[]

The frame layout, if you want to build the transaction yourself:

[ VERIFY (self, EXECUTION_AND_PAYMENT),
  SENDER(call_0) | ATOMIC_BATCH,
  …,
  SENDER(call_n) ]

Every call except the last carries ATOMIC_BATCH, and the last one closes the batch. If any frame in the batch fails, the whole batch rolls back. Each SENDER frame uses the call's execution and state hints, or 250,000 and 200,000 by default.

Throws on an empty list.

Gas limits are estimates

The per-frame limits have been checked in unit tests and not yet across many live devnet runs. Raise them through the execution and state fields of your calls if a frame runs out of gas.

On this page