pub fn add_ipfs_message<T: Config>(
schema_id: SchemaId,
cid: Vec<u8>,
payload_length: u32,
)Expand description
Adds a message for a resource hosted on IPFS. The input consists of a Base32-encoded CID as well as a 32-bit content length. The stored payload will contain the CID encoded as binary, as well as the 32-bit message content length. The actual message content will be on IPFS.
§Events
Event::MessagesInBlock- Messages Stored in the block
§Errors
Error::ExceedsMaxMessagePayloadSizeBytes- Payload is too large.Error::InvalidSchemaId- Schema not found.Error::InvalidPayloadLocation- The schema is not an IPFS payload location.Error::InvalidMessageSourceAccount- Origin must be from an MSA.Error::TypeConversionOverflow- Failed to add the message to storage as it is very full.Error::UnsupportedCidVersion- CID version is not supported (V0).Error::InvalidCid- Unable to parse provided CID.
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::add_ipfs_message.