Function pallet_schemas::pallet::dispatchables::create_schema_v3
source · pub fn create_schema_v3<T: Config>(
model: BoundedVec<u8, T::SchemaModelMaxBytesBoundedVecLimit>,
model_type: ModelType,
payload_location: PayloadLocation,
settings: BoundedVec<SchemaSetting, T::MaxSchemaSettingsPerSchema>,
schema_name: Option<SchemaNamePayload>
)
Expand description
Adds a given schema to storage. The schema in question must be of length between the min and max model size allowed for schemas (see pallet constants above). If the pallet’s maximum schema limit has been fulfilled by the time this extrinsic is called, a SchemaCountOverflow error will be thrown.
Events
Errors
Error::LessThanMinSchemaModelBytes
- The schema’s length is less than the minimum schema lengthError::ExceedsMaxSchemaModelBytes
- The schema’s length is greater than the maximum schema lengthError::InvalidSchema
- Schema is malformed in some wayError::SchemaCountOverflow
- The schema count has exceeded its boundsError::InvalidSetting
- Invalid setting is providedError::InvalidSchemaNameEncoding
- The schema name has invalid encodingError::InvalidSchemaNameCharacters
- The schema name has invalid charactersError::InvalidSchemaNameStructure
- The schema name has invalid structureError::InvalidSchemaNameLength
- The schema name has invalid lengthError::InvalidSchemaNamespaceLength
- The schema namespace has invalid lengthError::InvalidSchemaDescriptorLength
- The schema descriptor has invalid lengthError::ExceedsMaxNumberOfVersions
- The schema name reached max number of versions
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::create_schema_v3
.