Function pallet_messages::pallet::dispatchables::add_ipfs_message
source · 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 both 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 largeError::InvalidSchemaId
- Schema not foundError::InvalidPayloadLocation
- The schema is not an IPFS payload locationError::InvalidMessageSourceAccount
- Origin must be from an MSAError::TypeConversionOverflow
- Failed to add the message to storage as it is very fullError::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
.