ChainDev931105 / anchor-coin-flip

0 stars 1 forks source link

add more "random" inputs #7

Open ohaddahan opened 2 years ago

ohaddahan commented 2 years ago

https://github.com/ChainDev931105/anchor-coin-flip/blob/8f39241e7891a2350cc886ce95fb67d9d1b19f71/programs/coin-flip/src/lib.rs#L193

should add recent blockhash / slot / etc to the hash seeds , to make it harder to predict.

ChainDev931105 commented 2 years ago

yes, about hash elements, we will update it more

ohaddahan commented 2 years ago

yes, about hash elements, we will update it more

thanks.

ChainDev931105 commented 2 years ago

updated

ohaddahan commented 2 years ago

These are constants: https://github.com/ChainDev931105/anchor-coin-flip/blob/1b3df5df18ed8b4a9f7ec8827117d16e3065d153/programs/coin-flip/src/lib.rs#L416-L417

I meant to use the changing accounts details, and not use the constant account address, like this:

https://github.com/metaplex-foundation/metaplex-program-library/blob/cc2329d80c9aaf6eed95c8fdea78ac342fb6c32d/candy-machine/program/src/lib.rs#L279-L285