The ICS 20 spec imagines the ACK success type to be JSON encoding of "binary 0x01 base64 encoded". They then suggest this to be the string "AQ==".
The ics20 implementation seems to do the JSON encoding of the ASCII character '1' (ASCII codepoint 49) wrapped in an enum.
|
fn ack_success() -> Binary { |
|
let res = Ics20Ack::Result(b"1".into()); |
|
to_binary(&res).unwrap() |
|
} |
The result is that ack_success yields [123, 34, 114, 101, 115, 117, 108, 116, 34, 58, 34, 77, 81, 61, 61, 34, 125], whereas (I think) it ought to yield [34, 65, 81, 61, 61, 34]. The expected output is an array of bytes corresponding to ASCII character codes of AQ== surrounded by quotation marks (ASCII codepoint 34).
The ICS 20 spec imagines the ACK success type to be JSON encoding of "binary 0x01 base64 encoded". They then suggest this to be the string
"AQ==".The ics20 implementation seems to do the JSON encoding of the ASCII character '1' (ASCII codepoint 49) wrapped in an enum.
cw-plus/contracts/cw20-ics20/src/ibc.rs
Lines 67 to 70 in d0b68db
The result is that
ack_successyields[123, 34, 114, 101, 115, 117, 108, 116, 34, 58, 34, 77, 81, 61, 61, 34, 125], whereas (I think) it ought to yield[34, 65, 81, 61, 61, 34]. The expected output is an array of bytes corresponding to ASCII character codes ofAQ==surrounded by quotation marks (ASCII codepoint 34).