Ensure bytes decoded correctly via adding new tests.
It includes more tests for fixed sized bytes and dynamic sizes (bytes) also string
Example test
#[test]
fn test_decode_bytes32_zeroes() {
let mut data: Bytes = BytesTrait::blank();
data.append_u256(0x00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
let mut calldata = cd(data);
let decoded = calldata.decode(array![EVMTypes::Bytes32].span());
assert_eq!(*decoded.at(0), 0x1);
assert_eq!(*decoded.at(1), 0x000fffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
assert_eq!(*decoded.at(2), 0x00);
assert_eq!(*decoded.at(3), 0x1);
}
But im not sure the second part should be 0x00 or 0xff (first byte or last byte)
Ensure bytes decoded correctly via adding new tests.
It includes more tests for fixed sized bytes and dynamic sizes (bytes) also string
Example test
But im not sure the second part should be 0x00 or 0xff (first byte or last byte)