forked from TrueCloudLab/frostfs-contract
[#204] *: check contract version during update
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
8226bd4e43
commit
74cc2d0aea
12 changed files with 29 additions and 2 deletions
|
@ -19,9 +19,11 @@ func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) {
|
|||
}
|
||||
}
|
||||
|
||||
func _deploy(_ interface{}, isUpdate bool) {
|
||||
ctx := storage.GetContext()
|
||||
func _deploy(data interface{}, isUpdate bool) {
|
||||
if isUpdate {
|
||||
ctx := storage.GetContext()
|
||||
args := data.([]interface{})
|
||||
common.CheckVersion(args[len(args)-1].(int))
|
||||
storage.Delete(ctx, common.LegacyOwnerKey)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue