artonomous / artonomous-mvp

A Self-Owning, Self-Sustaining, Self-Improving Autonomous Artist Using the Ethereum Blockchain
158 stars 21 forks source link

Change block.time to blockhash. #20

Closed simondlr closed 6 years ago

simondlr commented 6 years ago

Adding an issue related to the review on PR #15.

Art piece currently uses block.number. It should use blockhash.

nickreynolds commented 6 years ago

To me, it makes sense to keep it as block.number on the smart contract, and just allow clients to get the blockhash from the block number when rendering the art. Any specific reason you think it should be blockhash on the contract?

Does blockhash now allow you to get the current blockhash? The documentation I'm seeing says the current blockhash is not available (only the previous 256). Is the documentation I'm seeing out of date or were you thinking that it would just use blockhash(block.number -1)?

simondlr commented 6 years ago

Ah. Should've read this first.

This solves the problem @markusbkoch we were discussing. Using block number means that whenever you view it, you will just be able to extract the block hash.

markusbkoch commented 6 years ago

Yes, it seems to me that storing block number instead of block hash in the NFT makes sense.

simondlr commented 6 years ago

Cool. Closing! Thanks @nickreynolds. :)