neo-project / docs

NEO Documentation
http://docs.neo.org
Creative Commons Attribution 4.0 International
195 stars 285 forks source link

Descriptions on getapplicationlog missing informations on stack. #1339

Closed zlewe closed 2 years ago

zlewe commented 2 years ago

In light of the withdrawals issue happened both with gate.io and binance. I've noticed that the docs on getapplicationlog (RPCAPI) is lacking the information that was mentioned in this medium article written by @hal0x2328.

Successful transfer: a Transfer notification event is emitted by the chain and the contract execution ends in a HALT state with a stack value of True. Failed transfer: no Transfer notification event is emitted, execution ends in a HALT state with a stack value of False NeoVM exception: a Transfer notification event may or may not be emitted, but execution ends in a FAULT state

image

I believe this may be the culprit on causing confusion for the exchange staff and leads to the above events. (Though they can have better handling on balance checking before sending.)

Affected docs (include but not limited to): https://docs.neo.org/docs/en-us/reference/rpc/latest-version/api/getapplicationlog.html https://docs.neo.org/docs/en-us/exchange/transaction.html#invoking-getapplicationlog

steven1227 commented 2 years ago

Thanks @zlewe . We will check soon