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 was 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?