Skip to main content
On Starknet, call_data is a JSON-encoded array of calls. It normally contains a token transfer and a Watchdog watch call that lets Layerswap match the deposit. Supported networks: Starknet Mainnet, Starknet Sepolia
Submit the complete array atomically — Starknet executes it natively as a single multicall transaction. Do not execute only the transfer or alter the watch call.

Transaction construction

1

Parse call_data

Deserialize the JSON string into an array of Starknet call objects.
2

Execute via Account

Pass the calls array to account.execute(). Starknet natively supports multicall, so all calls in the array are executed atomically in a single transaction.
3

Return the transaction hash

The execute method returns an object with transaction_hash.

Full example

The Server-side tab signs with a raw private key via starknet.js. The Browser tab connects to an injected wallet like ArgentX or Braavos via get-starknet. The starknet-react tab wraps it as a hook for React apps.
Connect the account to the network named in action.network before execution. Store transaction_hash and track the swap.