forked from TrueCloudLab/frostfs-contract
[#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:
parent
b45a4162b4
commit
b555e200f4
10 changed files with 20 additions and 20 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue