Transact Raw

From Kohaku CLI Wiki — Submit dapp calldata from a public account after unshielding

When you have the full call (target, payload, optional msg.value) but cannot attach it to the unshield — or you already unshielded — drive it from the CLI with transact-raw. No browser, no connected frontend.

This sits below tail calls in the Using Dapps preference order: same “you built the calldata” idea, just as a separate step after funds are already on a public address.

# Usage

Dry-run first (no --broadcast):

kohaku transact-raw --from 0xYourAddress \
  --targets 0xContract \
  --payloads 0xCalldata

Then broadcast when the printed operation looks right:

kohaku transact-raw --from 0xYourAddress \
  --targets 0xContract \
  --payloads 0xCalldata \
  --broadcast

For an external --from address, an interactive broadcast prompts for its private key with hidden input. A non-interactive broadcast requires --sender-priv <key>. The key must match --from and is not saved. Unsaved HD indexes from the wallet seed are derived automatically.

Optional ETH with the call:

kohaku transact-raw --from 0xYourAddress \
  --targets 0xContract \
  --payloads 0xCalldata \
  --values 0x<msg-value-in-hex> \
  --broadcast

Multiple calls are supported — pass matching lists for --targets / --payloads / optional --values.

# When to prefer this

  • You can get clean calldata (router, contract, etc.) without connecting a wallet to a dapp UI
  • You already unshielded to a fresh address, or the call cannot ride along with --tail-calls

If the call can ride with the unshield, prefer tail calls instead.

If you cannot build the payload at all and the dapp insists on a connected wallet, use the browser path — last resort.