mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
native: add additional parameters to deploy
1. Management contract has 2 overloads of `deploy` method. 2. Normal contracts should have `_deploy` with 2 parameters.
This commit is contained in:
parent
849385a533
commit
c1cc7e6f9d
10 changed files with 149 additions and 32 deletions
|
@ -16,7 +16,7 @@ func init() {
|
|||
trigger = runtime.GetTrigger()
|
||||
}
|
||||
|
||||
func _deploy(isUpdate bool) {
|
||||
func _deploy(_ interface{}, isUpdate bool) {
|
||||
if isUpdate {
|
||||
Log("_deploy method called before contract update")
|
||||
return
|
||||
|
|
|
@ -25,7 +25,7 @@ func init() {
|
|||
ctx = storage.GetContext()
|
||||
}
|
||||
|
||||
func _deploy(isUpdate bool) {
|
||||
func _deploy(_ interface{}, isUpdate bool) {
|
||||
if isUpdate {
|
||||
ticksLeft := storage.Get(ctx, ticksKey).(int) + 1
|
||||
storage.Put(ctx, ticksKey, ticksLeft)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue