diff --git a/pkg/core/native/native_nep5.go b/pkg/core/native/native_nep5.go index e969805cb..eb8c0ef23 100644 --- a/pkg/core/native/native_nep5.go +++ b/pkg/core/native/native_nep5.go @@ -208,11 +208,17 @@ func (c *nep5TokenNative) balanceOf(ic *interop.Context, args []vm.StackItem) vm } func (c *nep5TokenNative) mint(ic *interop.Context, h util.Uint160, amount *big.Int) { + if amount.Sign() == 0 { + return + } c.addTokens(ic, h, amount) c.emitTransfer(ic, nil, &h, amount) } func (c *nep5TokenNative) burn(ic *interop.Context, h util.Uint160, amount *big.Int) { + if amount.Sign() == 0 { + return + } amount = new(big.Int).Neg(amount) c.addTokens(ic, h, amount) c.emitTransfer(ic, &h, nil, amount)