self.notify() function in the Base trait (/stdlib/std/base.tact) is perfectly fine on its own, but is not very descriptive when it's used to return excessive funds.
I think we need to introduce an alias for self.notify() , such that it's clear what is going on when it's used for sending remaining nanoToncoins from the received message. For example, it can be called self.refundExcessive(), self.returnExcess(), self.refundRemaining(), self.sendRemaining() or just self.refund().
Maybe, we can play on the fact that it works just as self.notify(), so it may be called like self.notifyRefund() / self.refundNotify() or self.notifyWithRemaining().
Alternatively, it doesn't have to be tied to Base trait and the function can be defined as a global static, and be named refund(), refundRemaining() or cashback() :)
self.notify()
function in the Base trait (/stdlib/std/base.tact
) is perfectly fine on its own, but is not very descriptive when it's used to return excessive funds.I think we need to introduce an alias for
self.notify()
, such that it's clear what is going on when it's used for sending remaining nanoToncoins from the received message. For example, it can be calledself.refundExcessive()
,self.returnExcess()
,self.refundRemaining()
,self.sendRemaining()
or justself.refund()
.Maybe, we can play on the fact that it works just as
self.notify()
, so it may be called likeself.notifyRefund()
/self.refundNotify()
orself.notifyWithRemaining()
.Alternatively, it doesn't have to be tied to Base trait and the function can be defined as a global static, and be named
refund()
,refundRemaining()
orcashback()
:)Related to https://github.com/tact-lang/tact-docs/issues/231