Closed hantuzun closed 1 year ago
Should we use an other contract for translating timestamp into the date (considering the leap years and other things it is a huge code)? I can write something like that. If we should use, would it be consume gas? There will be only view functions but I've just learned that calling view functions from another contract consumes gas. If that is true we can simply pass a string of the draw date to the constructor.
View functions don't consume gas. If a view function calls another contract's view function, that can't consume gas. Only non-view functions are run by the network, therefore require the gas. The view functions are computed by the nodes and results are returned back to the callee.
Ideally, we better use another deployed contract for converting timestamp to human readable dates.
Here's what I suggest:
We would need to add the interface for this function, and we should deploy the contract to Goerli once.
This is another alternative: https://github.com/RollaProject/solidity-datetime#getmonth
I prefer the following format: January 31, 2023 23:59 UTC
. It's way more humanized than 2023-01-31 23:59 UTC
.
Deployed to this address on goerli - 0x85CC560EfebA375959B0FBA451cF4eBD1c8E6FA6
Closed with PR https://github.com/neu-fi/regen-bingo/pull/71 by @koybasimuhittin
The text below is hardcoded now:
Donating 0.05 ETH · Gitcoin Alpha Round · 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 · January 31, 2023
Generate the text from the following parameters:
Donating
should be changed toDonated
when the game ends.First, these parameters should be added to the constructor. Deployment scripts must be updated as well. Then, these parameters must be passed to RegenBingoMetadata and finally to RegenBingoSVG.