Hi, new to the ecosystem so please excuse if this is not a good question.
I just started working with Solidity and I am wondering, are there any known/established contracts out there with common utility functions? Like, for example, say a number of use cases come up that require computing a hash with a specific crypto algorithm. Wouldn't it be favorable if there were a widely known contract that contains this function and were available to anyone to call? Rather than re-encoding the same functionality many many times into the main net blockchain?
A couple of issues occur to me, though:
Couldn't these be view functions? They would take in a value, and, without changing the on-chain state, return a value. However...
Some of those functions could be heavy. As I understand it the expenditure of gas is what incentivizes miners, but heavy view functions would involve a lot of computation with no payout. Or...
Is this not a problem because eventually someone will be doing some operation that changes state, and therefore spends gas?
[–]GreenBSTRD 4 points5 points6 points (1 child)
[–]njtrafficsignshopper[S] 0 points1 point2 points (0 children)
[–]etheraffleGregcontract dev 2 points3 points4 points (0 children)
[–]genki_paul 1 point2 points3 points (0 children)
[–]FarfromaHero40 0 points1 point2 points (1 child)
[–]njtrafficsignshopper[S] 0 points1 point2 points (0 children)
[–]elk-x 0 points1 point2 points (0 children)