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
|
@ -46,7 +46,7 @@ func Migrate(script []byte, manifest []byte) bool {
|
|||
return false
|
||||
}
|
||||
mgmt := storage.Get(ctx, mgmtKey).(interop.Hash160)
|
||||
contract.Call(mgmt, "update", script, manifest)
|
||||
contract.Call(mgmt, "update", contract.All, script, manifest)
|
||||
runtime.Log("Contract updated.")
|
||||
return true
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ func Tick() bool {
|
|||
ticksLeft = ticksLeft.(int) - 1
|
||||
if ticksLeft == 0 {
|
||||
runtime.Log("Fired!")
|
||||
return contract.Call(runtime.GetExecutingScriptHash(), "selfDestroy").(bool)
|
||||
return contract.Call(runtime.GetExecutingScriptHash(), "selfDestroy", contract.All).(bool)
|
||||
}
|
||||
storage.Put(ctx, ticksKey, ticksLeft)
|
||||
i := binary.Itoa(ticksLeft.(int), 10)
|
||||
|
@ -73,7 +73,7 @@ func SelfDestroy() bool {
|
|||
return false
|
||||
}
|
||||
mgmt := storage.Get(ctx, mgmtKey).(interop.Hash160)
|
||||
contract.Call(mgmt, "destroy")
|
||||
contract.Call(mgmt, "destroy", contract.All)
|
||||
runtime.Log("Destroyed.")
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue