From f5441f60851feb046e2f6b03f5476c94794d87e5 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 26 Oct 2022 13:06:57 +0300 Subject: [PATCH] docs: fix doc for `transaction_executed` WS notification It returns *state.AppExecResult. --- docs/notifications.md | 103 ++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 53 deletions(-) diff --git a/docs/notifications.md b/docs/notifications.md index 740dfb392..741d4a200 100644 --- a/docs/notifications.md +++ b/docs/notifications.md @@ -347,8 +347,10 @@ Example: ### `transaction_executed` notification It contains the same result as from `getapplicationlog` method in the first -parameter and no other parameters. The only difference from `getapplicationlog` is -that it always contains zero in the `contract` field. +parameter and no other parameters. The difference from `getapplicationlog` is +that it has block's or transaction's hex-encoded LE Uint256 hash in the `container` +field instead of two separate `txid` and `blockhash` fields and a single execution +instead of an executions array. Example: ``` @@ -357,61 +359,31 @@ Example: "params" : [ { "container" : "0xe1cd5e57e721d2a2e05fb1f08721b12057b25ab1dd7fd0f33ee1639932fdfad7", - "executions" : [ + "trigger" : "Application", + "gasconsumed" : "2.291", + "stack" : [], + "notifications" : [ { - "trigger" : "Application", - "gasconsumed" : "2.291", - "contract" : "0x0000000000000000000000000000000000000000", - "stack" : [], - "notifications" : [ - { - "state" : { - "type" : "Array", - "value" : [ - { - "value" : "636f6e74726163742063616c6c", - "type" : "ByteString" - }, - { - "type" : "ByteString", - "value" : "7472616e73666572" - }, - { - "value" : [ - { - "value" : "769162241eedf97c2481652adf1ba0f5bf57431b", - "type" : "ByteString" - }, - { - "type" : "ByteString", - "value" : "316e851039019d39dfc2c37d6c3fee19fd580987" - }, - { - "value" : "1000", - "type" : "Integer" - } - ], - "type" : "Array" - } - ] + "state" : { + "type" : "Array", + "value" : [ + { + "value" : "636f6e74726163742063616c6c", + "type" : "ByteString" }, - "contract" : "0x1b4357bff5a01bdf2a6581247cf9ed1e24629176" - }, - { - "contract" : "0x1b4357bff5a01bdf2a6581247cf9ed1e24629176", - "state" : { + { + "type" : "ByteString", + "value" : "7472616e73666572" + }, + { "value" : [ - { - "value" : "7472616e73666572", - "type" : "ByteString" - }, { "value" : "769162241eedf97c2481652adf1ba0f5bf57431b", "type" : "ByteString" }, { - "value" : "316e851039019d39dfc2c37d6c3fee19fd580987", - "type" : "ByteString" + "type" : "ByteString", + "value" : "316e851039019d39dfc2c37d6c3fee19fd580987" }, { "value" : "1000", @@ -420,11 +392,36 @@ Example: ], "type" : "Array" } - } - ], - "vmstate" : "HALT" + ] + }, + "contract" : "0x1b4357bff5a01bdf2a6581247cf9ed1e24629176" + }, + { + "contract" : "0x1b4357bff5a01bdf2a6581247cf9ed1e24629176", + "state" : { + "value" : [ + { + "value" : "7472616e73666572", + "type" : "ByteString" + }, + { + "value" : "769162241eedf97c2481652adf1ba0f5bf57431b", + "type" : "ByteString" + }, + { + "value" : "316e851039019d39dfc2c37d6c3fee19fd580987", + "type" : "ByteString" + }, + { + "value" : "1000", + "type" : "Integer" + } + ], + "type" : "Array" + } } - ] + ], + "vmstate" : "HALT" } ], "jsonrpc" : "2.0"