# Fun easter egg for asset holders?

**URL:** <https://forum.openzeppelin.com/t/fun-easter-egg-for-asset-holders/23417>\
**Category:** Smart Contracts\
**Tags:** etherscan-verify\
**Created:** [January 26, 2022, 7:00am UTC](https://forum.openzeppelin.com/t/fun-easter-egg-for-asset-holders/23417 "2022-01-26T07:00:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![S\_S](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/s_s/32/12612_2.png) [@S\_S](https://forum.openzeppelin.com/u/S_S)\
**Post date:** [January 26, 2022, 7:00am UTC](https://forum.openzeppelin.com/t/fun-easter-egg-for-asset-holders/23417/1 "2022-01-26T07:00:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [January 26, 2022, 4:21pm UTC](https://forum.openzeppelin.com/t/fun-easter-egg-for-asset-holders/23417/2 "2022-01-26T16:21:34Z")

</div>

Hi, welcome! 👋

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

---

<div class="post-metadata">

**Author:** ![S\_S](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/s_s/32/12612_2.png) [@S\_S](https://forum.openzeppelin.com/u/S_S)\
**Post date:** [January 26, 2022, 7:06pm UTC](https://forum.openzeppelin.com/t/fun-easter-egg-for-asset-holders/23417/3 "2022-01-26T19:06:37Z")

</div>

@Skyge I was thinking from the contract

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [January 28, 2022, 7:51am UTC](https://forum.openzeppelin.com/t/fun-easter-egg-for-asset-holders/23417/4 "2022-01-28T07:51:31Z")

</div>

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:

> **[Verifiable Randomness for Blockchain Smart Contracts](https://blog.chain.link/chainlink-vrf-on-chain-verifiable-randomness/)**
>
> Chainlink VRF (Verifiable Randomness Function) allows blockchain developers to easily add verifiable randomness to their smart contracts.

---

<div class="post-metadata">

**Author:** ![S\_S](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/s_s/32/12612_2.png) [@S\_S](https://forum.openzeppelin.com/u/S_S)\
**Post date:** [January 29, 2022, 2:38am UTC](https://forum.openzeppelin.com/t/fun-easter-egg-for-asset-holders/23417/5 "2022-01-29T02:38:57Z")

</div>

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
