From 6daaa0c6d2097686a10ae935536ce99711faf18c Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 3 Jun 2021 11:21:40 +0300 Subject: [PATCH] [#88] container: Use large scope for container contract migration With contract migration from v0.8.0 to v0.9.0 we need to replace structures in contract memory. This produces native contract calls that are not available in scope of `management.Update`. Therefore we need to apply new scope first. Signed-off-by: Alex Vanin --- container/container_contract.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/container_contract.go b/container/container_contract.go index 186252f..d11408c 100644 --- a/container/container_contract.go +++ b/container/container_contract.go @@ -108,7 +108,7 @@ func Migrate(script []byte, manifest []byte, data interface{}) bool { return false } - management.UpdateWithData(script, manifest, data) + contract.Call(interop.Hash160(management.Hash), "update", contract.All, script, manifest, data) runtime.Log("container contract updated") return true