gochain / gofs

GoFS - GoChain FileSystem tools and documentation.
https://gofs.io
11 stars 3 forks source link

Consider Dropping GBH param #7

Closed jmank88 closed 5 years ago

jmank88 commented 5 years ago
function pin(bytes calldata cid, uint gbh)

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.

event Pinned(address indexed user, bytes indexed cid, uint gbh);
jmank88 commented 5 years ago

b5bb611c1d66b9b890d4a01d42ffe6faed84a809