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
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 viaget-starknet. The starknet-react tab wraps it as a hook for React apps.
action.network before execution.
Store transaction_hash and track the swap.