module Test { resource T { i: u64 } struct Event { } public test() { let t: R#Self.T; let t_ref: &mut R#Self.T; let i_ref: &mut u64; let sender: address; let event: V#Self.Event; let event_id: bytearray; t = T { i: 0 }; move_to_sender(move(t)); sender = get_txn_sender(); t_ref = borrow_global(copy(sender)); i_ref = &mut copy(t_ref).i; event = Event { }; event_id = b"69"; emit_event(move(i_ref), move(event_id), move(event)); release(move(t_ref)); t_ref = borrow_global(copy(sender)); release(move(t_ref)); return; } } //! new-transaction import {{default}}.Test; main() { Test.test(); return; }