Transaction lifecycle
Last updated
Was this helpful?
Last updated
Was this helpful?
Smart contracts interact with transaction during transaction lifecycle as described in the following diagram:
Transaction lifecycle steps.
Client signs transaction and sends it to API endpoint /api/events/add/event={encoded transaction}
Transaction is received by node.
Blockchain node checks that the state of transaction is consistent with the blockchain state and transaction is signed properly. If not - rejects transaction.
Node checks if there is a smart contract associated with space specified in space
transaction field. If there is no such smart contract - transaction is approved.
In the case smart contract is found, node executes confirm
method. If the result is true - transaction is approved, otherwise rejected.