# Bank & events (env)

> NeuroWASM bank and event host functions — transfer from the contract balance, emit_event and set_return.

Source: https://docs.nro.world/neurowasm/bank

## `transfer` <Badge type="tip" text="live" />

```text
transfer(to_ptr, to_len, amount: i64) → i32
```

Native uNRO payout from **this** contract’s balance. Host validates snapshot, debits in-memory for sequencing, records `(to, amount)` for commit only if the whole call succeeds (not dry-run).

| Return | Meaning |
|--------|---------|
| `0` | ok |
| `-1` | amount≤0, no self addr, insufficient balance, bad UTF-8 |

**Analogs:** CosmWasm `BankMsg::Send`, NEAR transfer / attached deposit.

## `emit_event` <Badge type="tip" text="live" />

```text
emit_event(topic_ptr, topic_len, data_ptr, data_len)
```

Append `{ topic, data }` UTF-8 event. Stored/indexed on successful commit.

## `set_return` <Badge type="tip" text="live" />

```text
set_return(ptr, len)
```

Set call `return_data` from guest memory (overwrites previous).

## `log` <Badge type="info" text="planned" />

Human log line; may map to `emit_event("log", …)`.
