mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
core: update System.Contract.Call
syscall
1. Remove `System.Contract.CallEx`. 2. Extend number of parameters. 3. Add return value count to `VM.Context`.
This commit is contained in:
parent
86b0e76bf0
commit
1c0c331e25
38 changed files with 170 additions and 171 deletions
|
@ -23,7 +23,6 @@ import (
|
|||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
|
||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||
"github.com/nspcc-dev/neo-go/pkg/vm"
|
||||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
||||
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||
|
@ -57,6 +56,7 @@ func init() {
|
|||
w := io.NewBufBinWriter()
|
||||
emit.Int(w.BinWriter, 0)
|
||||
emit.Opcodes(w.BinWriter, opcode.NEWARRAY)
|
||||
emit.Int(w.BinWriter, int64(callflag.All))
|
||||
emit.String(w.BinWriter, "finish")
|
||||
emit.Bytes(w.BinWriter, h.BytesBE())
|
||||
emit.Syscall(w.BinWriter, interopnames.SystemContractCall)
|
||||
|
@ -239,7 +239,7 @@ func (o *Oracle) FinishInternal(ic *interop.Context) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return contract.CallFromNative(ic, o.Hash, cs, req.CallbackMethod, args, vm.EnsureIsEmpty)
|
||||
return contract.CallFromNative(ic, o.Hash, cs, req.CallbackMethod, args, false)
|
||||
}
|
||||
|
||||
func (o *Oracle) request(ic *interop.Context, args []stackitem.Item) stackitem.Item {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue