The gbh param could be removed and derived from the tx value instead. This may appear a bit less user friendly, but callers already have to compute the correct value in order to send enough and would normally send the exact amount anyways. This will simplify the contract a bit, making it use less gas. Since the rate fluctuates, it's still necessary to capture the GBH purchased, so it should be added to the Pinned event.
The
gbh
param could be removed and derived from the tx value instead. This may appear a bit less user friendly, but callers already have to compute the correct value in order to send enough and would normally send the exact amount anyways. This will simplify the contract a bit, making it use less gas. Since therate
fluctuates, it's still necessary to capture the GBH purchased, so it should be added to thePinned
event.