Closed rodrigo-pino closed 5 months ago
Keccak is failing. It is producing the wrong hash value.
#[external(v0)] fn test_keccak(ref self: ContractState) { let mut input: Array::<u256> = Default::default(); input.append(u256 { low: 1, high: 0 }); let res = keccak::keccak_u256s_le_inputs(input.span()); assert(res.low == 0x587f7cc3722e9654ea3963d5fe8c0748, 'Wrong hash value'); assert(res.high == 0xa5963aa610cb75ba273817bce5f8c48f, 'Wrong hash value'); }
Solved on #42
Keccak is failing. It is producing the wrong hash value.