[#50] Replace interface{} with any

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-11-07 15:18:48 +03:00
parent dacac0b53d
commit d890a7eba4
25 changed files with 103 additions and 103 deletions

View file

@ -19,16 +19,16 @@ const (
)
// 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("processing 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
}
@ -50,7 +50,7 @@ func _deploy(data interface{}, isUpdate bool) {
// Update method updates contract source code and manifest. It can be invoked
// only by the sidechain committee.
func Update(script []byte, manifest []byte, data interface{}) {
func Update(script []byte, manifest []byte, data any) {
blockHeight := ledger.CurrentIndex()
alphabetKeys := roles.GetDesignatedByRole(roles.NeoFSAlphabet, uint32(blockHeight+1))
alphabetCommittee := common.Multiaddress(alphabetKeys, true)