[#128] Rename migrate methods to update

Neo Legacy used migration mechanism to update contracts.
N3 provides update method in native management contract.
Therefore, it makes sense to rename `Migrate` to `Update`.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-09-21 11:02:24 +03:00 committed by Alex Vanin
parent b45a4162b4
commit b555e200f4
10 changed files with 20 additions and 20 deletions

View file

@ -73,9 +73,9 @@ func _deploy(data interface{}, isUpdate bool) {
runtime.Log(name + " contract initialized")
}
// Migrate method updates contract source code and manifest. Can be invoked
// Update method updates contract source code and manifest. Can be invoked
// only by contract owner.
func Migrate(script []byte, manifest []byte, data interface{}) bool {
func Update(script []byte, manifest []byte, data interface{}) bool {
ctx := storage.GetReadOnlyContext()
if !common.HasUpdateAccess(ctx) {

View file

@ -73,9 +73,9 @@ func _deploy(data interface{}, isUpdate bool) {
runtime.Log("audit contract initialized")
}
// Migrate method updates contract source code and manifest. Can be invoked
// Update method updates contract source code and manifest. Can be invoked
// only by contract owner.
func Migrate(script []byte, manifest []byte, data interface{}) bool {
func Update(script []byte, manifest []byte, data interface{}) bool {
ctx := storage.GetReadOnlyContext()
if !common.HasUpdateAccess(ctx) {

View file

@ -93,9 +93,9 @@ func _deploy(data interface{}, isUpdate bool) {
runtime.Log("balance contract initialized")
}
// Migrate method updates contract source code and manifest. Can be invoked
// Update method updates contract source code and manifest. Can be invoked
// only by contract owner.
func Migrate(script []byte, manifest []byte, data interface{}) bool {
func Update(script []byte, manifest []byte, data interface{}) bool {
ctx := storage.GetReadOnlyContext()
if !common.HasUpdateAccess(ctx) {

View file

@ -98,9 +98,9 @@ func _deploy(data interface{}, isUpdate bool) {
runtime.Log("container contract initialized")
}
// Migrate method updates contract source code and manifest. Can be invoked
// Update method updates contract source code and manifest. Can be invoked
// only by contract owner.
func Migrate(script []byte, manifest []byte, data interface{}) bool {
func Update(script []byte, manifest []byte, data interface{}) bool {
ctx := storage.GetReadOnlyContext()
if !common.HasUpdateAccess(ctx) {

View file

@ -109,9 +109,9 @@ func _deploy(data interface{}, isUpdate bool) {
runtime.Log("neofs: contract initialized")
}
// Migrate method updates contract source code and manifest. Can be invoked
// Update method updates contract source code and manifest. Can be invoked
// only by contract owner.
func Migrate(script []byte, manifest []byte, data interface{}) bool {
func Update(script []byte, manifest []byte, data interface{}) bool {
ctx := storage.GetReadOnlyContext()
if !common.HasUpdateAccess(ctx) {

View file

@ -58,9 +58,9 @@ func _deploy(data interface{}, isUpdate bool) {
runtime.Log("neofsid contract initialized")
}
// Migrate method updates contract source code and manifest. Can be invoked
// Update method updates contract source code and manifest. Can be invoked
// only by contract owner.
func Migrate(script []byte, manifest []byte, data interface{}) bool {
func Update(script []byte, manifest []byte, data interface{}) bool {
ctx := storage.GetReadOnlyContext()
if !common.HasUpdateAccess(ctx) {

View file

@ -123,9 +123,9 @@ func _deploy(data interface{}, isUpdate bool) {
runtime.Log("netmap contract initialized")
}
// Migrate method updates contract source code and manifest. Can be invoked
// Update method updates contract source code and manifest. Can be invoked
// only by contract owner.
func Migrate(script []byte, manifest []byte, data interface{}) bool {
func Update(script []byte, manifest []byte, data interface{}) bool {
ctx := storage.GetReadOnlyContext()
if !common.HasUpdateAccess(ctx) {

View file

@ -49,9 +49,9 @@ func _deploy(data interface{}, isUpdate bool) {
runtime.Log("processing contract initialized")
}
// Migrate method updates contract source code and manifest. Can be invoked
// Update method updates contract source code and manifest. Can be invoked
// only by contract owner.
func Migrate(script []byte, manifest []byte, data interface{}) bool {
func Update(script []byte, manifest []byte, data interface{}) bool {
ctx := storage.GetReadOnlyContext()
if !common.HasUpdateAccess(ctx) {

View file

@ -48,9 +48,9 @@ func _deploy(data interface{}, isUpdate bool) {
runtime.Log("proxy contract initialized")
}
// Migrate method updates contract source code and manifest. Can be invoked
// Update method updates contract source code and manifest. Can be invoked
// only by contract owner.
func Migrate(script []byte, manifest []byte, data interface{}) bool {
func Update(script []byte, manifest []byte, data interface{}) bool {
ctx := storage.GetReadOnlyContext()
if !common.HasUpdateAccess(ctx) {

View file

@ -42,9 +42,9 @@ func _deploy(data interface{}, isUpdate bool) {
runtime.Log("reputation contract initialized")
}
// Migrate method updates contract source code and manifest. Can be invoked
// Update method updates contract source code and manifest. Can be invoked
// only by contract owner.
func Migrate(script []byte, manifest []byte, data interface{}) bool {
func Update(script []byte, manifest []byte, data interface{}) bool {
ctx := storage.GetReadOnlyContext()
if !common.HasUpdateAccess(ctx) {