MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / encode_data

Function encode_data

fendermint/rpc/src/response.rs:24–28  ·  view source on GitHub ↗

Apply the encoding that Tendermint does to the bytes inside [`DeliverTx`].

(data: &[u8])

Source from the content-addressed store, hash-verified

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

Callers 1

parse_deliver_txFunction · 0.85

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected