You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 18, 2019. It is now read-only.
When calling ExecutionEngine.callingScriptHash() from org.neo.smartcontract.framework.services.system we are experiencing a problem when verifying another smart contract.
When the function is called in Main(), it gives the correct smart contract caller hash. Like so:
However, when calling the script from a nested function in Main(), for example someFunction() that returns a boolean is gives a different and incorrect hash when the script is called. Like so:
publicclassTokenextendsSmartContract{
// some functionpublicstaticbooleansomeFuntion() {
// wrong and different hash!byte[] caller = (byte[]) ExecutionEngine.callingScriptHash(); // < ----returntrue;
}
// mainpublicstaticObjectMain(Stringoperation, Object[] args) {
// function callsomeFuntion();
}
}
Could you help me? How can we avoid this situation? I can provide more info. We can not verify a script now. Are we doing something wrong maybe?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Dear devs,
When calling
ExecutionEngine.callingScriptHash()
fromorg.neo.smartcontract.framework.services.system
we are experiencing a problem when verifying another smart contract.When the function is called in
Main()
, it gives the correct smart contract caller hash. Like so:However, when calling the script from a nested function in
Main()
, for examplesomeFunction()
that returns aboolean
is gives a different and incorrect hash when the script is called. Like so:Could you help me? How can we avoid this situation? I can provide more info. We can not verify a script now. Are we doing something wrong maybe?
The text was updated successfully, but these errors were encountered: