[#184] *: Change panic to Log+ABORT in OnNEP17Payment

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-11-30 12:44:05 +03:00 committed by Alex Vanin
parent e6a33e8193
commit a2f5f7a74a
5 changed files with 19 additions and 7 deletions

View file

@ -22,7 +22,7 @@ const (
func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) {
caller := runtime.GetCallingScriptHash()
if !common.BytesEqual(caller, []byte(gas.Hash)) {
panic("processing contract accepts GAS only")
common.AbortWithMessage("processing contract accepts GAS only")
}
}