Merge pull request #1805 from nspcc-dev/interop/convertcontext-fix

interop: fix ConvertContextToReadOnly interop
This commit is contained in:
Roman Khimov 2021-03-04 12:31:36 +03:00 committed by GitHub
commit 58ea4607d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,7 @@ const (
// using this new Context. If Context is already read-only this function is a
// no-op. It uses `System.Storage.AsReadOnly` syscall.
func ConvertContextToReadOnly(ctx Context) Context {
return neogointernal.Syscall0("System.Storage.AsReadOnly").(Context)
return neogointernal.Syscall1("System.Storage.AsReadOnly", ctx).(Context)
}
// GetContext returns current contract's (that invokes this function) storage