[#50] Replace interface{}
with any
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
dacac0b53d
commit
d890a7eba4
25 changed files with 103 additions and 103 deletions
|
@ -10,16 +10,16 @@ import (
|
|||
)
|
||||
|
||||
// OnNEP17Payment is a callback for NEP-17 compatible native GAS contract.
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) {
|
||||
func OnNEP17Payment(from interop.Hash160, amount int, data any) {
|
||||
caller := runtime.GetCallingScriptHash()
|
||||
if !common.BytesEqual(caller, []byte(gas.Hash)) {
|
||||
common.AbortWithMessage("proxy contract accepts GAS only")
|
||||
}
|
||||
}
|
||||
|
||||
func _deploy(data interface{}, isUpdate bool) {
|
||||
func _deploy(data any, isUpdate bool) {
|
||||
if isUpdate {
|
||||
args := data.([]interface{})
|
||||
args := data.([]any)
|
||||
common.CheckVersion(args[len(args)-1].(int))
|
||||
return
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ func _deploy(data interface{}, isUpdate bool) {
|
|||
|
||||
// Update method updates contract source code and manifest. It can be invoked
|
||||
// only by committee.
|
||||
func Update(script []byte, manifest []byte, data interface{}) {
|
||||
func Update(script []byte, manifest []byte, data any) {
|
||||
if !common.HasUpdateAccess() {
|
||||
panic("only committee can update contract")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue