Skip to content

Commit 545aa24

Browse files
committed
(fix) Pass strings to scilla as strings, rather than arrays of their bytes.
1 parent 295f931 commit 545aa24

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

zilliqa/src/precompiles/scilla.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ fn read_index(ty: ScillaType, d: &mut Decoder) -> Result<Vec<u8>> {
181181
ScillaType::Uint64 => serde_json::to_vec(&u64::detokenize(d.decode()?).to_string())?,
182182
ScillaType::Uint128 => serde_json::to_vec(&u128::detokenize(d.decode()?).to_string())?,
183183
ScillaType::Uint256 => serde_json::to_vec(&U256::detokenize(d.decode()?).to_string())?,
184-
ScillaType::String => String::detokenize(d.decode()?).into_bytes(),
184+
ScillaType::String => serde_json::to_vec(&String::detokenize(d.decode()?))?,
185185
ScillaType::Map(_, _) => {
186186
return Err(anyhow!("a map cannot be the key of another map"));
187187
}

0 commit comments

Comments
 (0)