Skip to main content

Description

The subscription to this channel will be providing information about the blockchain smart contract instance task progress

Channel Name

tenant-{$this->tenantId}.smart-contracts-instances

{$this->tenantId} - the current tenant id

Events

smart_contract_instance_changed

An example of the smart contract instance changed event, where:

  • "type" - The type of the blockchain smart contract instance
  • "id" - The id of the blockchain smart contract instance
  • "attributes.status" - The status of the blockchain smart contract instance, can be pending, when the smart contract is not send, failed when the user rejected a sending on the wallet, in_progress when the smart contract sending to blockchain in progress, when the smart contract was successfully send
  • "attributes.owner_id" - The owner id of the blockchain smart contract instance, the id of the smart contract task instance
  • "attributes.owner_type" - The owner type of the blockchain smart contract instance, can be "task"
  • "attributes.output" - The output of the blockchain smart contract instance execution
  • "attributes.relationships.errors.data.type" - The type of the blockchain smart contract instance error
  • "attributes.relationships.errors.data.id" - The id of the blockchain smart contract instance error
  • "attributes.relationships.errors.data.attributes.message" - The message of the blockchain smart contract instance error
  • "attributes.relationships.errors.data.attributes.data.code": The code of the blockchain smart contract instance error
  • "attributes.relationships.errors.data.attributes.created_at": The date and time when the blockchain smart contract instance error was triggered
{
"dto": {
"data": {
"type": "blockchain_smart_contracts_instances",
"id": "2318a31a-0bcf-48d1-9350-a6ae499007c0",
"attributes": {
"status": "in_progress",
"owner_id": "2318a31a-0bcf-48d1-9350-a6ae499007c0",
"owner_type": "task",
"output": []
},
"relationships": {
"errors": {
"data": [
{
"type": "blockchain_smart_contracts_instances_errors",
"id": "2318a31a-0bcf-48d1-9350-a6ae499007c0",
"attributes": {
"message": "Contract execution error: Failed to execute write operation: str.charCodeAt is not a function",
"data": [
"code": "CONTRACT_EXECUTION_ERROR"
],
"created_at": "2022-02-24T05:00:01+00:00"
}
}
]
}
}
}
}
}