Bank & events (env)
transfer live
text
transfer(to_ptr, to_len, amount: i64) → i32Native 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 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 live
text
set_return(ptr, len)Set call return_data from guest memory (overwrites previous).
log planned
Human log line; may map to emit_event("log", …).