How to call create block
When a third-party module creates a block that needs to send block information to the Block Management, follow these steps:
-
Obtain the
ILocalBlockMessageService
service. -
Invoke the
SyncBlockToBMS
method.
var localBlockMessageService = scope.ServiceProvider.GetRequiredService<ILocalBlockMessageService>();
var state = await localBlockMessageService.SyncBlockToBMS(blockDetail);
Information on the properties for the BlockDetail
object can be found in the API Documentation.