mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-05 13:06:20 +00:00
core: hangle CallingScriptHash correctly
When using native contracts, script hash of second-to-top context on invocation stack does not always correspond to a real calling contract.
This commit is contained in:
parent
e903e40085
commit
e63191d31f
4 changed files with 33 additions and 5 deletions
|
@ -440,7 +440,8 @@ func getTestContractState() (*state.Contract, *state.Contract) {
|
|||
emit.Syscall(w.BinWriter, interopnames.SystemStorageGet)
|
||||
emit.Opcodes(w.BinWriter, opcode.RET)
|
||||
onPaymentOff := w.Len()
|
||||
emit.Int(w.BinWriter, 3)
|
||||
emit.Syscall(w.BinWriter, interopnames.SystemRuntimeGetCallingScriptHash)
|
||||
emit.Int(w.BinWriter, 4)
|
||||
emit.Opcodes(w.BinWriter, opcode.PACK)
|
||||
emit.String(w.BinWriter, "LastPayment")
|
||||
emit.Syscall(w.BinWriter, interopnames.SystemRuntimeNotify)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue