-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HF-based native contract update doesn't work as expected #3194
Comments
Closed
AnnaShaleva
added a commit
that referenced
this issue
Apr 12, 2024
Take into account event attributes declared onto the base class for native contracts. Close #3194. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
10 tasks
AnnaShaleva
added a commit
that referenced
this issue
Apr 12, 2024
Take into account event attributes declared onto the base class for native contracts. Close #3194. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
AnnaShaleva
added a commit
that referenced
this issue
Apr 12, 2024
Take into account event attributes declared onto the base class for native contracts. Close #3194. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
shargon
added a commit
that referenced
this issue
Apr 16, 2024
* SmartContract: fix native NEP-17 manifest construction Take into account event attributes declared onto the base class for native contracts. Close #3194. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> * SmartContract: add UT to check native contract states Ensure that contract states generated with all hardforks enabled match the expected values. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> * Update tests/Neo.UnitTests/SmartContract/Native/UT_NativeContract.cs * Update tests/Neo.UnitTests/SmartContract/Native/UT_NativeContract.cs --------- Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru> Co-authored-by: Shargon <shargon@gmail.com> Co-authored-by: Jimmy <jinghui@wayne.edu>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
While testing the NeoGo's port of HF-based native contracts update I discovered the following situation: native NEP-17 tokens do not have
Transfer
events declared in their manifest. So states comparison of the fresh NeoC# node master with nspcc-dev/neo-go#3402 gives us:And if take a look at the genesis block state dumps we can see that:
So there are two state differences in genesis block. Contract
-1
is native Management, it stores contract states by0x08
prefix,f563ea40bc283d4d0e05c48ea305b3f2a07340ef
andcf76e28bd0062c4a478ee35561011319f3cfa4d2
are Neo and Gas token contracts hashes correspondingly, and the resulting contract states differ from NeoGo at declaredevents
field:Also,
getcontractstate
call to NeoC# RPC node gives us the following result (Transfer
events are missing in the declaration):To Reproduce
Steps to reproduce the behavior:
getcontractstate
RPC call for Neo or Gas native contracts.Expected behavior
Both Neo and Gas should have proper events declared in the manifest.
Platform:
(Optional) Additional context
This bug is critical for 3.7, we should fix it before the release.
The text was updated successfully, but these errors were encountered: