MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / encode_data

Function encode_data

fendermint/rpc/src/response.rs:22–26  ·  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

20
21/// Apply the encoding that Tendermint does to the bytes inside [`DeliverTx`].
22pub 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///

Callers 1

parse_exec_tx_resultFunction · 0.85

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected