(&self, item: &T)
| 42 | } |
| 43 | |
| 44 | fn commit<T: borsh::BorshSerialize>(&self, item: &T) { |
| 45 | // use risc0_zkvm::guest::env::Write as _; |
| 46 | let buf = borsh::to_vec(item).expect("Serialization to vec is infallible"); |
| 47 | let mut journal = env::journal(); |
| 48 | journal.write_all(&buf).unwrap(); |
| 49 | } |
| 50 | |
| 51 | fn verify<T: borsh::BorshSerialize>(&self, method_id: [u32; 8], output: &T) { |
| 52 | env::verify(method_id, &borsh::to_vec(output).unwrap()).unwrap(); |
no outgoing calls
no test coverage detected