Apply the encoding that Tendermint does to the bytes inside [`DeliverTx`].
(data: &[u8])
| 20 | |
| 21 | /// Apply the encoding that Tendermint does to the bytes inside [`DeliverTx`]. |
| 22 | pub fn encode_data(data: &[u8]) -> Bytes { |
| 23 | let b64 = base64::engine::general_purpose::STANDARD.encode(data); |
| 24 | let bz = b64.as_bytes(); |
| 25 | Bytes::copy_from_slice(bz) |
| 26 | } |
| 27 | |
| 28 | /// Parse what Tendermint returns in the `data` field of [`DeliverTx`] as raw bytes. |
| 29 | /// |
no test coverage detected