Fun easter egg for asset holders?

I am looking to have a fun little easter egg in the smart contract for anyone that owns any amount of the token.

I am hoping that they can interact with the smart contract in etherscan and it would check if their balance for the token as greater than 0 and if so it would give them a fun message.

I believe this is possible, but just want to check first without spending a good chunk of time on it as well as take suggestions for how the code may look like.

Hi, welcome! :wave:

So how to provide these message? From the contract or your own database?

@Skyge I was thinking from the contract

I think in your case, generating random message in contract is okay.
You can write your own function to do this, or you can have a look at this tool of the ChainkLink:

Awesome, I think this is what I was going for. I will mark as the solution for now and will update if anything changes if it does not meet my needs. Thank you for the input @Skyge

1 Like