We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We're casting from u64 to u16 here:
pub fn add_l2_to_l1_message( vm_state: &mut VMState, opcode: &Opcode, state_storage: &mut StateStorage, ) -> Result<(), EraVmError> { let key = vm_state.get_register(opcode.src0_index).value; let value = vm_state.get_register(opcode.src1_index).value; let is_service = opcode.imm0 == 1; state_storage.record_l2_to_l1_log(L2ToL1Log { key, value, is_service, address: vm_state.current_context()?.contract_address, shard_id: 0, tx_number: vm_state.tx_number as u16, // <-------- THIS ONE })?; Ok(()) }
But the vm's field is actually a u64, so we should check if this is safe or simply change it to avoid bugs/panics.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We're casting from u64 to u16 here:
But the vm's field is actually a u64, so we should check if this is safe or simply change it to avoid bugs/panics.
The text was updated successfully, but these errors were encountered: