workflow {

    state {
        last_price: u64
    }

    program {
        initiating fn start(&mut self) -> ProgramResult {
            ON data = event "price_update" CALL [handle_price data: data];
            Ok(())
        }

        fn handle_price(&mut self, data: u64) -> ProgramResult {
            self.last_price = data;
            Ok(())
        }
    }

}
