[**Fixed**] ApplicationLogs Console Printing#3348
[**Fixed**] ApplicationLogs Console Printing#3348NGDAdmin merged 3 commits intoneo-project:masterfrom
ApplicationLogs Console Printing#3348Conversation
Jim8y
left a comment
There was a problem hiding this comment.
what if they updated but still have the same param length?
|
Then parameter name will be wrong. There is no tracking for this in core or |
roman-khimov
left a comment
There was a problem hiding this comment.
Makes sense, follows the already existing "missing contract" logic.
|
@cschuchardt88 Somewhere still hasn't get the latest manifest arguments. neo> log tx 0xfc84a6153decbb0171142dfab535e9f53d5ad820c4480d83a5307fba239f337f
Trigger: Application
VM State: HALT
Exception: null
Gas Consumed: 0.14578843
Stack:
0: {"type":"Boolean","value":true}
Notifications:
ScriptHash: 0x48c40d4666f93408be1bef038b6722404d9a4c2a
Event Name: Transfer
State Parameters:
from: {"type":"ByteString","value":"eIgtv7rryQI17Ldq48mV4vwgoLg="}
to: {"type":"ByteString","value":"7MAgTg6XM6llts9y33c3yLCFWk0="}
amount: {"type":"Integer","value":"8392000000"}
ScriptHash: 0xf0151f528127558851b39c2cd8aa47da7418ab28
Event Name: Transfer
State Parameters:
arg1: {"type":"ByteString","value":"7MAgTg6XM6llts9y33c3yLCFWk0="}
arg2: {"type":"ByteString","value":"eIgtv7rryQI17Ldq48mV4vwgoLg="}
arg3: {"type":"Integer","value":"1398299720061"}
ScriptHash: 0x48c40d4666f93408be1bef038b6722404d9a4c2a
Event Name: Transfer
State Parameters:
from: {"type":"ByteString","value":"7MAgTg6XM6llts9y33c3yLCFWk0="}
to: {"type":"ByteString","value":"oyJrAPWr9bXxnMN64ykd4lk6YKk="}
amount: {"type":"Integer","value":"4196000"}
ScriptHash: 0x4d5a85b0c83777df72cfb665a933970e4e20c0ec
Event Name: Synced
State Parameters:
balance0: {"type":"Integer","value":"35128294503880"}
balance1: {"type":"Integer","value":"5869390309517200"}
ScriptHash: 0x4d5a85b0c83777df72cfb665a933970e4e20c0ec
Event Name: Swapped
State Parameters:
caller: {"type":"ByteString","value":"I0/XJYzDXXchuDI3tmXX7Mz0cPk="}
amount0In: {"type":"Integer","value":"8392000000"}
amount1In: {"type":"Integer","value":"0"}
amount0Out: {"type":"Integer","value":"0"}
amount1Out: {"type":"Integer","value":"1398299720061"}
to: {"type":"ByteString","value":"eIgtv7rryQI17Ldq48mV4vwgoLg="} |
|
Maybe merge this after the UT, then add a few UT tests for this pr. |
|
@superboyiii seems that it's FLM's problem that they specified their arguments' name like that: https://explorer.onegate.space/contractinfo/0xf0151f528127558851b39c2cd8aa47da7418ab28 |
Oh, I see. That's only event arguments. Yes, their name is non-standard. |
|
@superboyiii You need to be looking at their |


Description
This PR fixes an issue due to
ApplicationLogsand blockchain's lack of knowledge about previous contract states; since they are not stored.ApplicationLogswhen printing information to console for users to lookups; this method uses current manifest (fromcore/NativeContract) for a contract to map event parameternamesto the event by it's parameterindex. So if a contract were toupdateand/orremovethis event oraddan ambiguous event orchangeparameter count with the same event name. The information will not be displayed (will crash or benull).Now instead it will print the event's parameter
index, if the above would happen.No Resync Required!Type of change
Checklist: